Commit Graph

28 Commits

Author SHA1 Message Date
Patrick Ohly
2f6c4f5eab e2e: use Ginkgo context
All code must use the context from Ginkgo when doing API calls or polling for a
change, otherwise the code would not return immediately when the test gets
aborted.
2022-12-16 20:14:04 +01:00
Patrick Ohly
d4729008ef e2e: simplify test cleanup
ginkgo.DeferCleanup has multiple advantages:
- The cleanup operation can get registered if and only if needed.
- No need to return a cleanup function that the caller must invoke.
- Automatically determines whether a context is needed, which will
  simplify the introduction of context parameters.
- Ginkgo's timeline shows when it executes the cleanup operation.
2022-12-13 08:09:01 +01:00
Patrick Ohly
df5d84ae81 e2e: accept context from Ginkgo
Every ginkgo callback should return immediately when a timeout occurs or the
test run manually gets aborted with CTRL-C. To do that, they must take a ctx
parameter and pass it through to all code which might block.

This is a first automated step towards that: the additional parameter got added
with

    sed -i 's/\(framework.ConformanceIt\|ginkgo.It\)\(.*\)func() {$/\1\2func(ctx context.Context) {/' \
        $(git grep -l -e framework.ConformanceIt -e ginkgo.It )
    $GOPATH/bin/goimports -w $(git status | grep modified: | sed -e 's/.* //')

log_test.go was left unchanged.
2022-12-10 19:50:18 +01:00
Piotr Nosek
3d7855392f HPA E2E Test: CPU / Memory: Average Value / Utilization 2022-09-09 16:06:55 +00:00
Dave Chen
d61adab518 Stop using the deprecated Measure method
As what suggested by Ginkgo migration guide, `Measure` node was
deprecated and replaced with `It` node which creates `gmeasure.Experiment`.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-11 17:40:33 +08:00
Dave Chen
857458cfa5 update ginkgo from v1 to v2 and gomega to 1.19.0
- update all the import statements
- run hack/pin-dependency.sh to change pinned dependency versions
- run hack/update-vendor.sh to update go.mod files and the vendor directory
- update the method signatures for custom reporters

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-07-08 10:44:46 +08:00
Sergiusz Urbaniak
1495c9f2cd
test/e2e/*: default existing tests to privileged pod security policy
This is to ensure that all existing tests don't break when defaulting
the pod security policy to restricted in the e2e test framework.
2022-04-05 08:41:12 +02:00
Vivek Singh
80e4007bc3 test: e2e: HPA ContainerResource
This add e2e test for HPA ContainerResource metrics. This add test to cover two scenarios
1. Scale up on a busy application with an idle sidecar container
2. Do not scale up on a busy sidecar with an idle application.

Signed-off-by: Vivek Singh <svivekkumar@vmware.com>
2021-07-21 10:24:00 +05:30
wojtekt
f277e4d32a Remove nested SIGDescribe calls 2021-03-03 15:25:07 +01:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
YuikoTakada
c402a4bf65 WIP: use e2eskipper package in test/e2e/autoscaling 2020-01-14 06:03:53 +00:00
danielqsj
b7b1055bf4 refactor autoscaling utils in e2e 2019-11-06 17:02:42 +08:00
Dan Winship
71b02dd422 Fix up e2enode.GetReadySchedulableNodes, replace many uses of framework.GetReadySchedulableNodesOrDie
Remove the "OrDie" from the name (since it doesn't "or die") and add
an extra check that there is at least 1 node available, since many
callers already did that themselves, and many others should have.
2019-09-24 13:03:39 -04:00
ClarkLee
5030064d2e use ExpectEqual under e2e/autoscaling 2019-07-08 18:57:18 +08:00
Jiatong Wang
b1c346c295 Move node related methods to framework/node package
- Add a package "node" under e2e/framework and alias e2enode;
- Rename some functions whose name have redundant string.

Signed-off-by: Jiatong Wang <wangjiatong@vmware.com>
2019-06-17 16:59:07 -07:00
s-ito-ts
c101f40e18 Fix golint failures of test/e2e/autoscaling 2019-05-20 02:20:39 +00:00
Andrew Sy Kim
1470df7a05 remove usages of internal clientset in e2e framework
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-03-28 21:13:40 -04:00
p0lyn0mial
1f1d24005a removes custom scalers from kubectl 2018-03-26 19:33:42 +02:00
Aleksandra Malinowska
73a1227f39 Avoid unnecessary gcloud call if test was skipped 2017-10-09 11:35:11 +02:00
Kubernetes Submit Queue
f7dd62f149 Merge pull request #51277 from irfanurrehman/hpa-e2e-mod-for-fed
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

[Federation] Update hpa e2e utils to enable reuse in fed hpa tests

This PR is to enable reuse of some hpa e2e utils in federation, facilitating https://github.com/kubernetes/kubernetes/pull/50168
cc @mwielgus @quinton-hoole 
cc @kubernetes/sig-federation-pr-reviews 

**Release note**:

```NONE
```
2017-09-20 18:01:40 -07:00
Aleksandra Malinowska
daf77aca1d adjust parameter in cluster autoscaling test 2017-09-20 11:41:15 +02:00
Aleksandra Malinowska
69f1f2f296 use allocatable instead of capacity 2017-09-19 10:26:14 +02:00
Andrzej Wasylkowski
0c1ab5597e Renamed ClusterSize and WaitForClusterSize to NumberOfReadyNodes and WaitForReadyNodes, respectively. 2017-08-29 11:53:17 +02:00
Irfan Ur Rehman
eb33d1b1d0 [Federation] Update hpa e2e utils to enable reuse in fed hpa tests 2017-08-24 21:21:16 +05:30
xiangpengzhao
13726a8229 Add [sig-autoscaling] prefix to autoscaling e2e tests 2017-08-01 20:06:11 +08:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Andrzej Wasylkowski
ce9f3bcfef Added an end-to-end test measuring autoscaling's efficiency. 2017-06-20 12:56:19 +02:00