Commit Graph

120 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
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
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
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
Davanum Srinivas
497e9c1971
Cleanup OWNERS files (No Activity in the last year)
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-15 10:34:02 -05:00
Davanum Srinivas
9405e9b55e
Check in OWNERS modified by update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-12-09 21:31:26 -05:00
Nikhil Sharma
fc0ec62626 Changed code to improve output for files under test/e2e/lifecycle 2021-11-09 22:24:27 +05:30
Davanum Srinivas
07332ad398
fix ineffassign and varcheck
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-14 08:41:22 -04:00
cndoit18
51717256f9
fix(timezone): the timezone is standardized to UTC
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2021-06-03 23:55:39 +08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Lubomir I. Ivanov
93549d5037 test/e2e/lifecycle: update OWNERS
The e2e/lifecycle package is owned by SIG CL, although maybe this
should be moved to e2e/auth at some point.

- copy the OWNERS from /cmd/kubeadm (minus the area/kueadm label)
- remove the OWNERS file in /bootstrap letting the parent OWNERS file
manage this sub-package.
2020-05-29 23:12:44 +03:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
danielqsj
fc738cbb1d unify alias of api errors under test 2019-12-26 16:40:45 +08:00
tanjunchen
d2d68026fc Fix golint issues in test/e2e/lifecycle/ 2019-12-03 17:14:38 +08:00
Kubernetes Prow Robot
7ed388caa6
Merge pull request #83744 from neolit123/1.17-move-test-owners-sig-cl-gcp
test/e2e: move some tests from cluster-lifecycle to cloud-provider-gcp
2019-10-17 16:33:58 -07:00
Lubomir I. Ivanov
0b3d50b6dc test/e2e: move GKE/GCE tests from /lifecycle to /cloud/gcp
Move GKE/GCE tests from the sig-cluster-lifecycle
ownership to the sig-cloud-provider-gcp ownership
(ideally the GCP sub-project).
2019-10-12 21:40:07 +03:00
Bob Killen
e65d8bb11f
Move jbeda to emeritus status. 2019-10-11 17:46:18 -04:00
mattjmcnaughton
b92a51285b
Address staticcheck failures for test/e2e/lifecycle/bootstrap
Make small, non-functional changes to make the
`test/e2e/lifecycle/bootstrap` pass staticcheck.
2019-10-11 10:28:15 -04:00
Timothy St. Clair
97055841b1 Audit of test/* OWNERS files 2019-10-10 15:52:51 -05:00
Dan Winship
ec4c1a1c05 Add e2enode.GetRandomReadySchedulableNode, replace some uses of framework.GetReadySchedulableNodesOrDie
For tests that want a single ready, schedulable node
2019-09-24 13:03:40 -04: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
carlory
3c70201d1b remove blank lines 2019-08-28 01:27:31 +08:00
carlory
2301a3b15b cleanup test code in lifecycle, servicecatalog and ui package 2019-08-27 09:51:23 +08:00
Kenichi Omichi
2cd45b2c54 Move ProxyRequest to kubelet e2e fw
In e2e test framework, ProxyRequest() is called in kubelet e2e test
framework only. In addition, the function works for kubelet as tests
which call the function do. So this moves the function into kubelet
e2e test framework to make the dependency simple.
2019-08-13 23:25:47 +00:00
Jeffrey Sica
ea2f6c80d7 support args for newrc funcs 2019-07-28 11:45:43 -04:00
draveness
d3158b2c71 feat: use framework.ExpectNotEqual in e2e test 2019-07-10 21:36:26 +08:00
Kubernetes Prow Robot
2d1ee3db83
Merge pull request #79864 from draveness/feature/use-framework-expect-equal-instead
feat: use framework.ExpectEqual instead of should
2019-07-09 13:47:03 -07:00
Kubernetes Prow Robot
a61006bbc4
Merge pull request #75593 from pohly/e2e-no-global-flags
e2e: avoid mandatory command line flags
2019-07-09 03:10:03 -07:00
draveness
0ec95afb76 feat: use framework.ExpectEqual instead of should 2019-07-07 21:07:48 +08:00
SataQiu
02585c8a08 e2e: use framework.ExpectEqual() for test/e2e/lifecycle 2019-07-07 17:09:11 +08:00
Patrick Ohly
1822895ce2 update Bazel 2019-07-04 17:15:14 +02:00
Patrick Ohly
b86a007057 e2e: avoid mandatory command line flags
Tests should never directly add to the global command line, because
some users of the tests might not want them there. For example,
options might only get set directly from a config file.

To achieve that, e2e/framework/config, e2e/framework/viperconfig, and
e2e/framework/test_context.go avoid using the global flag set and
instead expect to be told by the caller which flag set to use. Tests
that called flag directly either get updated or obsolete flags get
removed.

The exception is framework.HandleFlags, which as before directly
implements global command line handling.

This is a breaking change for test suites which do not use that
function (and only those): they now need to ensure that they copy
individual flags from tests. Because the RegisterCommonFlags prototype
has changed, test suite authors will notice due to the resulting
compilation errors.
2019-07-04 17:15:14 +02:00
Kubernetes Prow Robot
d1d111496a
Merge pull request #79238 from bclau/tests/reduce-to-agnhost-part-3
tests: Replaces images used with agnhost (part 3)
2019-06-28 12:43:19 -07:00
wojtekt
e8ca50c43c Use coordination v1 API 2019-06-27 18:08:40 +02:00
Claudiu Belu
c752ea8134 tests: Replaces images used with agnhost (part 3)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- audit-proxy
- crd-conversion-webhook
- entrypoint-tester
- inclusterclient
- iperf
- porter
- serve-hostname
2019-06-26 13:33:55 -07:00
Kubernetes Prow Robot
dc8b928136
Merge pull request #79162 from SataQiu/fix-test-20190619
Refactor: replace framework.Failf with e2elog.Failf
2019-06-21 12:17:04 -07:00
Aaron Crickenberger
b8d0ce4019 add import-alias for k8s.io/api/core/v1 2019-06-20 11:40:15 -07:00
SataQiu
332be4b1e3 refactor: replace framework.Failf with e2elog.Failf 2019-06-19 17:52:35 +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
Masaki Kimura
701395c392 Remove dot import from e2e test and replace with framework.ExpectNoError 2019-06-14 20:46:11 +00:00
Jorge Alarcon Ochoa
4969a05327 Refactored pod-related functions from framework/util.go
This a refactoring of framework/utils.go into framework/pod.

Signed-off-by: Jorge Alarcon Ochoa <alarcj137@gmail.com>
2019-05-30 09:30:26 -04:00
Kubernetes Prow Robot
8f23ad2c24
Merge pull request #77754 from atoato88/issue-77103-use-ExpectError-e2e-lifecycle-bootstrap
Use framework.ExpectNoError() for e2e/lifecycle/bootstrap
2019-05-13 16:59:21 -07:00
Kubernetes Prow Robot
389252feae
Merge pull request #77709 from danielqsj/test
replace test error checking with more readable way
2019-05-13 13:15:23 -07:00
Akihito INOH
d35851724e Use framework.ExpectNoError() for e2e/lifecycle/bootstrap
The e2e test framework has ExpectNoError() for readable test code.
This replaces Expect(err).NotTo(HaveOccurred()) with it for e2e/lifecycle/bootstrap.
2019-05-11 05:04:05 +09:00
danielqsj
f3ea5e5c94 replace test error checking with more readable way 2019-05-10 10:15:45 +08:00
Akihito INOH
be4af8f83f Use framework.ExpectNoError() for e2e/lifecycle
The e2e test framework has ExpectNoError() for readable test code.
This replaces Expect(err).NotTo(HaveOccurred()) with it for e2e/lifecycle.
2019-05-10 10:45:32 +09:00
John Schnake
338bc3ce42 Move framework ssh code to new package
The framework/ssh.go code was heavily used throughout the framework
and could be useful elsewhere but reusing those methods requires
importing all of the framework.

Extracting these methods to their own package for reuse.

Only a few methods had to be copied into this package from the
rest of the framework to avoid an import cycle.
2019-05-08 11:00:36 -05:00