Commit Graph

144 Commits

Author SHA1 Message Date
Davanum Srinivas
90d185b7e1
Drop AWS kubelet credential provider and cleanup AWS storage e2e tests
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-07 09:00:12 -05:00
Patrick Ohly
136f89dfc5 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-02-06 15:39:13 +01:00
Antonio Ojea
7f5ae1c0c1
Revert "e2e: wait for pods with gomega" 2023-02-06 12:08:22 +01:00
Patrick Ohly
222f655062 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-01-31 13:01:39 +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
Jan Safranek
6005c3b512 Remove OpenStack cloud provider
And keep OpenStack Cinder CSI translation
2022-11-11 12:04:55 +01:00
Jan Safranek
5b284a50b7 Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae9.
2022-11-10 18:25:30 +01:00
Jan Safranek
d6c36736d5 Add mock CSI driver test for SELinux mount 2022-11-08 13:37:09 +01:00
Patrick Ohly
f15d7f6cca e2e storage: eliminate context.TODO and cleanup callbacks
Tests should accept a context from Ginkgo and pass it through to all functions
which may block for a longer period of time. In particular all Kubernetes API
calls through client-go should use that context. Then if a timeout occurs,
the test returns immediately because everything that it could block on will
return.

Cleanup code then needs to run in a separate Ginkgo node, typically
DeferCleanup, which ensures that it gets a separate context which has not timed
out yet.
2022-10-20 13:56:59 +02:00
Humble Chirammal
c2a7bfd6b4 removal of glusterfs in-tree driver code from the source
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-13 20:11:50 +05:30
Davanum Srinivas
9bbf01bae9
Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-22 16:43:14 -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
Abirdcfly
1dbd9de96d
cleanup:delete same utils.go in pkg/apis/storage
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-06-29 20:54:34 +08:00
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests 2022-03-28 15:42:10 +02:00
Léiyì Zhang
496ccc06ad skip tests that uses default storage class when there is no default storage class installed 2021-11-17 19:14:16 +00:00
Léiyì Zhang
2298dc612c skip in-tree and default Dynamic Provisioner test when there's no default storage class 2021-11-16 19:26:30 +00:00
Shivanshu Raj Shrivastava
d9b21cd1de
fixed using reference to loop iterator 2021-11-12 17:22:36 +05:30
Kubernetes Prow Robot
7a9c8940fd
Merge pull request #102682 from chendave/e2e_storage
Check empty zone after the validation of providers
2021-06-24 18:56:44 -07:00
tewei.luo
72a53288a5 Remove gcepd unmanaged zone test.
This test verifies an implementation detail in the in-tree gcepd
plugin. The behavior is not implementated in the gcepd CSI driver
and therefore the test will be obsolete after CSI migration.
2021-06-19 04:13:11 +00:00
Dave Chen
8d0936b743 Check empty zone after the validation of providers
This make sure the testcase that cannot run locally will be skipped
instead of throwing the misleading failure message.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-06-08 13:51:21 +08:00
Mauricio Poppe
88165b02ba remove v1beta1 volume provisioning test 2021-05-18 20:46:57 +00:00
Tomas Smetana
8773e0d491 Fix invalid AWS KMS key test flake 2021-04-28 13:22:49 +02:00
Mauricio Poppe
5d9053014e Update tests to use common pod functions from framework/pod/utils.go 2021-03-11 07:25:56 +00:00
Mauricio Poppe
432928b673 Skip creation of the same storageclass in e2e tests 2021-03-01 20:15:54 +00:00
wojtekt
8df355b80a Replace some nested KubeDescribe calls with ginkgo.Describe 2021-02-25 14:44:39 +01:00
Fabio Bertinatto
ee082985c2 e2e: promote use of functions that support custom timeouts in storage tests.
WaitForPodSuccessInNamespace[Slow] are replaced by WaitForPodSuccessInNamespaceTimeout(),
so that custom timeouts are used instead of the hardcoded ones.
2020-12-02 16:14:13 -03:00
Fabio Bertinatto
c82626f96f e2e: use custom timeouts in all storage E2E tests 2020-12-02 15:57:58 -03:00
Kenichi Omichi
0ebaae88b1 Replace framework.Failf with ExpectNoError 2020-06-03 20:16:12 +00:00
drfish
dfab6b637f Update .import-aliases for e2e test framework 2020-03-25 11:40:02 +08:00
Kenichi Omichi
2158989d6f Move WaitForPersistentVolumeDeleted() to e2epv
The function is for persistent volumes and it doesn't have any
reason why it stays in core test framework. So this moves the
function into e2epv package for reducing e2e/framework/util.go
code.
2020-03-24 22:54:07 +00:00
Kenichi Omichi
c586d8837a Move GetClusterZones() to e2enode 2020-03-10 18:16:54 +00: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
Kubernetes Prow Robot
14ed35712c
Merge pull request #87168 from misterikkit/timout-err
storage e2e: Add context to timeout errors
2020-01-15 01:22:32 -08:00
Jonathan Basseri
99a015705b storage e2e: Add context to timeout errors
Many times an e2e test fails with an unexpected error,
"timed out waiting for the condition".

Useful information may be in the test logs, but debugging e2e test
failures will be much faster if we add context to errors when they
happen.

This change makes sure we add context to all errors returned from
helpers like wait.Poll().
2020-01-14 11:45:38 -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
danielqsj
fc738cbb1d unify alias of api errors under test 2019-12-26 16:40:45 +08:00
SataQiu
27d645dc5b fix staticcheck failures of test/e2e/storage 2019-12-07 21:32:11 +08:00
John Schnake
2dab911ac2 Use imageutils instead of hardcoded image paths
A number of tests were using hardcoded image paths instead of
going through the imageutils package. The reason for centralizing
the logic there is to keep an eye on what images we use and where
they come from.
2019-09-27 15:01:08 -05:00
Michelle Au
95c7b42340 add topology e2es to storage testsuite
Change-Id: I1ec4247cef5d477ae2a76136113a4ed5ce30bf44
2019-09-20 12:26:53 -07: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
Humble Chirammal
daa19ef44c Migrate the e2e provisioner container image to a different location.
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2019-08-29 13:10:22 +05:30
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
Antonio Ojea
10ef878e08
Add IPv6 support to e2e GlusterDynamicProvisioner 2019-08-07 09:47:36 +02:00
David Zhu
862ba3fc05 Document and improve defaulting for MakePersistentVolume, dedupe some manual PV creations 2019-07-25 10:57:29 -07:00
David Zhu
e194cf24cc Dedupe all Make PVC API object functions into the one MakePersistentVolumeClaim to rule them all 2019-07-23 12:59:00 -07:00