Commit Graph

52 Commits

Author SHA1 Message Date
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
Jing Xu
51d5303662 Fix err variable shadowing issue in storage/utils
Issue: https://github.com/kubernetes/kubernetes/issues/86884
This PR fixes the issue that err variable gets shadowed. Because of
this, it might get nil pointer error.

Change-Id: Ib7da918418a7c8148a6ca598db12b3744eb3b7c8
2020-01-06 12:15:29 -08:00
danielqsj
fc738cbb1d unify alias of api errors under test 2019-12-26 16:40:45 +08:00
Kubernetes Prow Robot
4ca93592d2
Merge pull request #86147 from tanjunchen/use-framework-Equal-20191211
test/e2e/storage : use framework.Equal() replace gomega.Expect(...).To(gomega.BeTrue(),...)
2019-12-11 11:32:24 -08:00
tanjunchen
f8e0c6bb41 test/e2e/storage : use framework.Equal() replace gomega.Expect(...).To(gomega.BeTrue(),...) 2019-12-11 16:25:26 +08:00
SataQiu
e70120f083 fix staticcheck failures of e2e/storage/utils e2e/storage/vsphere 2019-12-11 10:33:21 +08:00
tanjunchen
9eda99793d use ExpectEqual of framework in test/e2e/storage 2019-12-03 17:41:49 +08:00
Olev Kartau
373909946e utils.go: Changed bashExec to shExec, bash not guaranteed. 2019-11-12 14:42:24 +02:00
Olev Kartau
2fac3f2c20 test/e2e: Reduce need to use local kubectl
Use POST method instead of running local kubectl.
Use ExecCommandInContainerWithFullOutput() instead of RunKubectl().
PodExec() takes additional framework arg, passed down in call chain.
VerifyExecInPodFail uses different error code cast as original
one causes test code Panic if used with new call method.
2019-11-12 14:42:24 +02:00
Kenichi Omichi
94211f1839 Move functions from e2e framework util.go
The following functions are called at some specific places only,
so this moves these functions to the places and makes them local.

- WaitForPersistentVolumeClaimDeleted: Moved to e2e storage
- PrintSummaries: Moved to e2e framework.go
- GetHostExternalAddress: Moved to e2e node
- WaitForMasters: Moved to e2e cloud gcp
- WaitForApiserverUp: Moved to e2e network
- WaitForKubeletUp: Moved to e2e storage vsphere
2019-11-08 19:25:16 +00:00
Yecheng Fu
8def74f394 use HostExec and sets.String 2019-10-28 10:35:06 +08:00
Yecheng Fu
25c5ad52fd simplify global mount points check 2019-10-28 10:35:06 +08:00
Yecheng Fu
b536395c07 Add e2e test to check for filesystem volume device mount cleanup 2019-10-28 10:35:02 +08:00
Jan Safranek
612fb1793e Test global block directory in reconstruction tests 2019-10-04 14:03:40 +02:00
Kubernetes Prow Robot
ec05944b13
Merge pull request #83108 from jsafrane/hostexec-volumemode
Use pod + nsenter instead of SSH in block volume tests
2019-10-04 02:46:29 -07: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
Jan Safranek
c1c0ba1c76 Use pod + nsenter instead of SSH in block volume tests
listPodVolumePluginDirectory was moved to break import cycle.
2019-09-25 13:34:27 +02: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
5c68a231ab
Merge pull request #81620 from wongma7/nfs-alpha
Bump nfs-provisioner to include GetReference fix
2019-08-20 10:47:15 -07:00
Matthew Wong
9da84cfbdf Bump nfs-provisioner to include GetReference fix 2019-08-16 16:54:08 -07:00
Jan Safranek
2c79ffe274 Add test for unused volumes 2019-08-15 10:48:41 +02:00
Masaki Kimura
2306d2ff31 Refactor e2e tests 2019-08-01 20:09:47 +00:00
Masaki Kimura
f1d2d9d670 Move disruptive tests to testsuites and add ones for block volume 2019-08-01 20:04:10 +00:00
draveness
4c2e77a53e feat: use framework.ExpectEqual in storage e2e test 2019-07-04 22:24:29 +08: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
Kubernetes Prow Robot
08922a1399
Merge pull request #78148 from endyman/fix-golint-test/e2e/storage/utils
fix golint errors in test/e2e/storage/utils
2019-06-14 02:50:51 -07:00
Kubernetes Prow Robot
b8ba75bcd9
Merge pull request #77526 from alejandrox1/framework_util_pod_refactor
Refactored pod-related functions from framework/util.go
2019-06-13 23:06:19 -07: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
Kenichi Omichi
63e0507fd9 Check e2e test code to use ExpectError()
We can use framework.ExpectError() for checking the expected error
happens. However Expect(err).To(HaveOccurred()) can be used instead
and that makes the e2e test code unreadable.
This adds the check to use framework.ExpectError() for readable code.
2019-05-29 17:04:58 +00:00
Nils Domrose
d14c2cca8a fix golint errors in test/e2e/storage/utils 2019-05-21 11:11:21 +02:00
danielqsj
1058877fbf remove dot imports in e2e/storage 2019-05-10 13:56:26 +08: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
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
aaa
433f86c6a7 Use fmt.printf() to end with a newline
update pull request

update pull request

update pull request
2019-04-10 07:43:54 -04:00
Masaki Kimura
b474b28f7b Use framework.ExpectNoError() for rest of under test/e2e/storage 2019-04-04 18:51:51 +00:00
Masaki Kimura
b4c88acec6 Add e2e tests for multiAttach 2019-03-09 00:26:00 +00:00
Matthew Wong
bee759b925 Add volume mode downgrade test: should not mount/map in <1.13 2018-11-16 13:38:59 -05:00
Masaki Kimura
4fcb36e205 Move minimum set of dynamic provisioning e2e test to testsuites 2018-10-22 16:04:43 +00:00
Jing Xu
9de354034b Make sure kubelet is restarted in the storage test
In some storage tests, kubelet is stopped first and the test check node
NotReady state. However, if it fails to have this state, kubelet could
not be restarted because the defer function is placed after the stop
kubelet command. This PR fixes this issue.
2018-10-17 14:19:04 -07:00
David Zhu
0698354f61 Add privileged test pod security policy to local volume provisioner test service account 2018-09-18 14:25:31 -07:00
Matthew Wong
5d877436bf Update external provisioner test to use latest nfs-provisioner 2018-08-31 16:26:02 -04:00
Davanum Srinivas
6cd8bd62fe
e2e test harness - use busybox from dockerhub
Use the same pattern everywhere in the e2e test
harness, use busybox (from dockerhub) instead
of using the one from k8s.gcr.io registry.

Change-Id: I57c3b867408c1f9478a8909c26744ea0368ff003
2018-08-07 11:22:16 -04:00
Masaki Kimura
1b06ba5072 Add e2e tests for volumeMode of persistent volume
This set of e2e tests is to confirm that persistent volume works well for all volumeModes.
Coverage of the tests are shown in the figure of [Test cases], below.

Once implementation policy is confirmed to be good, we can add plugins and test cases to this.

[Test cases]
 #   plugin      volumeMode    Test case                                              Expectation
--- ---------- -------------- ------------------------------------------------------ ------------
 1    iSCSI      Block         (a) Create Pod with PV and confirm Read/Write to PV    Success
 2    iSCSI      FileSystem    (a) Create Pod with PV and confirm Read/Write to PV    Success
 3    RBD        Block         (a) Create Pod with PV and confirm Read/Write to PV    Success
 4    RBD        FileSystem    (a) Create Pod with PV and confirm Read/Write to PV    Success
 5    CephFS     Block         (a) Create Pod with PV and confirm Read/Write to PV    Fail
 6    CephFS     FileSystem    (a) Create Pod with PV and confirm Read/Write to PV    Success
 7    NFS        Block         (a) Create Pod with PV and confirm Read/Write to PV    Fail
 8    NFS        FileSystem    (a) Create Pod with PV and confirm Read/Write to PV    Success

fixes: #56803
2018-06-27 17:25:55 +00:00
Michelle Au
46b62c20e4 Wait for pod deletion instead of termination 2018-05-17 10:08:54 -07:00
Michelle Au
7aca917ea4 Refactor subpath reconstruction tests to use util test 2018-04-11 14:20:29 -07:00
Hemant Kumar
b85c4fc57a Refactor disruptive tests to use more volume types 2018-03-16 11:49:22 -04:00