Commit Graph

14 Commits

Author SHA1 Message Date
Patrick Ohly
41f23f52d0 test: fix ginkgolinter issues
All of these issues were reported by https://github.com/nunnatsa/ginkgolinter.
Fixing these issues is useful (several expressions get simpler, using
framework.ExpectNoError is better because it has additional support for
failures) and a necessary step for enabling that linter in our golangci-lint
invocation.
2023-02-22 19:36:05 +01:00
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
Patrick Ohly
5614a9d064 e2e framework: eliminate interim sub packages
The "todo" packages were necessary while moving code around to avoid hitting
cyclic dependencies. Now that any sub package can depend on the framework, they
are no longer needed and the code can be moved into the normal sub packages.
2022-10-06 08:16:47 +02:00
Patrick Ohly
a46fea53e6 e2e framework: move pod exec and create into sub package 2022-10-06 08:16:47 +02:00
Kubernetes Prow Robot
b3057e7ccc
Merge pull request #106834 from mengjiao-liu/sysctl-allow-slashes
Add support for slash as sysctl separator to Pod securityContext field and to PodSecurityPolicy
2022-07-15 01:04:24 -07: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
Mengjiao Liu
5fca1112e1 Add test for sysctl support slash as separator 2022-06-22 10:39:52 +08:00
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests 2022-03-28 15:42:10 +02:00
pacoxu
ddaa3466eb correct unsafe sysctls e2e test case & use status reason check instead of events watch
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2021-08-18 15:11:09 +08:00
Mike Miranda
0cce9a4a6c Remove conformance status from a sysctl test and relabel 2021-07-22 20:12:26 +00:00
mgutierrez98
1cfbb0aa25 remove webhook.go to revert changes to conformance test 2021-07-01 20:24:46 +00:00
Skyler Clark
c6b99025a6
adds sysctls conformance tests 2021-03-25 09:28:25 -04:00
wojtekt
3b438eb4e5 Cleanup test/e2e/common directory - part2 2021-03-03 10:27:35 +01:00