Commit Graph

35 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
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
Robert Bost
9ab07e1814 Skip tests unless multizone 2022-01-04 15:26:11 -07:00
Divyen Patel
518844fd25 use GA topology labels for vsphere 2021-06-21 10:37:31 -07:00
Fabio Bertinatto
c82626f96f e2e: use custom timeouts in all storage E2E tests 2020-12-02 15:57:58 -03:00
Tim Hockin
819ff9b087
Use topology labels instead of old beta names (#96033)
* Rename const for topology.../zone

* Rename const for topology.../region

* Rename const for failure-domain.../zone

* Rename const for failure-domain.../region

* Restore old names for compat
2020-11-05 20:26:50 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Jonathan Basseri
09121d9686 Add missing tag to vSphere storage E2E tests
This adds the [Feature:vsphere] tag to those vSphere tests which were
missing it. This makes it easier to specifically target the vSphere
storage E2E test suite.
2020-02-10 14:48:55 -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
Kubernetes Prow Robot
2514c4b130
Merge pull request #87705 from misterikkit/whitespace
Fix comment whitespace
2020-01-31 20:08:05 -08:00
Jonathan Basseri
b6ba39d013 Fix comment whitespace
This test has a text diagram which used tab characters. By switching to
spaces, the diagram looks correct regardless of IDE settings.
2020-01-30 14:26:39 -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
SataQiu
e70120f083 fix staticcheck failures of e2e/storage/utils e2e/storage/vsphere 2019-12-11 10:33:21 +08:00
Kubernetes Prow Robot
c0d5d11263
Merge pull request #75583 from sandeeppsunny/zone_support
Added e2e test to verify zone support across datacenters
2019-12-10 16:04:06 -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
Sandeep Sunny
6b0748d3b5 Added e2e test to verify zone support across datacenters in the same vCenter 2019-09-10 23:14:41 -07:00
carlory
910bd000ff use log functions of core framework in the 'test/e2e/storage/*' 2019-09-06 10:26:16 +08:00
Kubernetes Prow Robot
8f17e46e5c
Merge pull request #81943 from dims/update-import-aliases-for-1.16-test-e2e
Use preferred import packages for test/e2e
2019-08-28 05:11:25 -07: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
Davanum Srinivas
46cc8adcc3
Use preferred import packages for test/e2e
Ran `hack/update-import-aliases.sh`

Change-Id: Ieaf3599a80ec90026b2c83f25c797d121a461549
2019-08-26 08:56:42 -04:00
skarthiksrinivas
73271c1970 Provision vSphere volume as per selectedNode 2019-07-28 22:03:02 -07:00
SataQiu
332be4b1e3 refactor: replace framework.Failf with e2elog.Failf 2019-06-19 17:52:35 +08:00
danielqsj
629ec7e113 replace test error checking with more readable way 2019-05-10 13:58:09 +08:00
danielqsj
8a6fede9e6 remove dot imports in e2e/storage/vsphere 2019-05-10 13:56:16 +08:00
Kubernetes Prow Robot
8fa775e546
Merge pull request #75187 from subramanian-neelakantan/host_to_create_volume
Use any host that mounts the datastore to create Volume
2019-05-07 08:15:54 -07: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
Subramanian Neelakantan
18922a3c44 Use any host that mounts the datastore to create Volume
Also, This change makes zone to work per datacenter and cleans up dummy vms.
There can be multiple datastores found for a given name. The datastore name is
unique only within a datacenter. So this commit returns a list of datastores
for a given datastore name in FindDatastoreByName() method. The calles are
responsible to handle or find the right datastore to use among those returned.
2019-05-03 16:42:41 +05:30
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