Commit Graph

28 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
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
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04: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
Fabio Bertinatto
c82626f96f e2e: use custom timeouts in all storage E2E tests 2020-12-02 15:57:58 -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
shahra
18f05ef5b9 Fix golint errors in test/e2e/storage/vsphere 2020-01-16 11:12:31 -08:00
yuxiaobo
73fb0ab5ec test/e2e/storage:Use e2eskipper package
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-13 14:04:10 +08:00
Dan Winship
6a040438ea Update test/e2e/storage for new GetReadySchedulableNodes stuff 2019-10-09 08:12:56 -04:00
WanLinghao
a6f5d99409 Refactor and clean up e2e framework utils. This patch handles test/e2e/framework/pv_util.go file 2019-09-18 17:57:13 +08:00
carlory
910bd000ff use log functions of core framework in the 'test/e2e/storage/*' 2019-09-06 10:26:16 +08:00
alejandrox1
7c161d6a5f Refactoring pod related functions from pv_util to pod pkg
Moving pod related functions from e2e/framework/pv_util.go to
e2e/framework/pod in order to allow refactoring of pv_util.go into its
own package.

Signed-off-by: alejandrox1 <alarcj137@gmail.com>
2019-08-27 12:27:45 -04:00
skarthiksrinivas
73271c1970 Provision vSphere volume as per selectedNode 2019-07-28 22:03:02 -07:00
Aaron Crickenberger
9a6600f9f4 add import-alias for k8s.io/api/storage/v1 2019-06-20 11:40:57 -07:00
danielqsj
8a6fede9e6 remove dot imports in e2e/storage/vsphere 2019-05-10 13:56:16 +08:00
John Schnake
a6f5ebf831 Move storage tests to use the framework/log package
This is part of the transition to using framework/log instead
of the Logf inside the framework package. This will help with
import size/cycles when importing the framework or subpackages.
2019-05-04 12:50:38 -05:00
Masaki Kimura
b474b28f7b Use framework.ExpectNoError() for rest of under test/e2e/storage 2019-04-04 18:51:51 +00:00
Sandeep Sunny
5b59c6e08c Added e2e tests for multi-zone volume provisioning 2019-02-19 18:44:20 +05:30
xiangpengzhao
1f80008f41 Remove the use of storage class beta annotations in e2e tests. 2018-04-10 15:29:08 +08:00
Divyen Patel
c0490fa623 removing production code usage from e2e tests code 2018-02-13 10:41:16 -08:00
prashima
819b97ba7e vSphere test infrastructure improvement and new node-unregister test 2018-02-09 12:45:35 -08:00
Balu Dontu
4683a9471f Add multi-vc configuration for e2e tests 2018-01-18 15:29:27 -08:00
Rohit Jog
015e20cb15 e2e test layout changes for vsphere (#398) 2017-12-18 10:19:18 -08:00