Commit Graph

57 Commits

Author SHA1 Message Date
Abirdcfly
00b9ead02c cleanup: remove duplicate import
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
2022-07-14 11:25:19 +08: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
Léiyì Zhang
4a314b9d56 fixed incorrect tag on volume cloning test case 2022-04-15 21:20:12 +00:00
Sergiusz Urbaniak
373c08e0c7
test/e2e/framework: configure pod security admission level for e2e tests 2022-03-28 15:42:10 +02:00
Diego Goytia
de969ae2bf Testing GenerateReadBlockCmd for enabling block volume tests. 2021-09-24 18:50:21 +00:00
Jing Xu
33feaee2c2 Fix windows storage tests
1. fix command empty issue for some Windows storage tests
2. enable more windows storage tests by adding ntfs test patten

Change-Id: Ic33be282d669a23107474a14d4368bbf95c9b459
2021-07-20 22:40:20 -07:00
Kubernetes Prow Robot
a331cf74b7
Merge pull request #102050 from pohly/fix/deflake-metrics-proxy
remove metrics proxy
2021-07-02 12:30:10 -07:00
Mauricio Poppe
f0d7e9c9d1 undo windows compatibility changes because the linux commands work 2021-06-22 18:27:54 +00:00
Mauricio Poppe
9a146bc3e9 Remove [LinuxOnly] string from ginkgo tests 2021-06-22 18:27:54 +00:00
Mauricio Poppe
54070a6628 Enable another test in windows, use a /bin/sh command instead of a PS one 2021-06-22 18:27:53 +00:00
Mauricio Poppe
ee34cd640a enable gcpdcsi multivolume tests with windows nodes 2021-06-22 18:27:50 +00:00
Patrick Ohly
5e9076da93 e2e: grab controller and scheduler metrics via port forwarding
The previous approach with grabbing via a nginx proxy had some
drawbacks:
- it did not work when the pods only listened on localhost (as
  configured by kubeadm) and the proxy got deployed on a different
  node
- starting the proxy raced with starting the pods, causing
  sporadic test failures because the proxy was not set up
  properly unless it saw all pods when starting the e2e.test
- the proxy was always started, whether it is needed or not
- the proxy was left running after a test and then the next
  test run triggered potentially confusing messages when
  it failed to create objects for the proxy

The new approach is similar to "kubectl port-forward" + "kubectl get
--raw". It uses the port forwarding feature to establish a TCP
connection via a custom dialer, then lets client-go handle TLS and
credentials.

Somehow verifying the server certificate did not work. As this
shouldn't be a big concern for E2E testing, certificate checking gets
disabled on the client side instead of investigating this further.
2021-06-16 12:02:40 +02:00
Jan Safranek
3e0269ce6e Move common code to ensureTopologyRequirements
Every call to ensureTopologyRequirements has the same setup + checks.
Therefore move this common code into the call to reduce redundancy.
2021-06-16 11:24:29 +02:00
Jan Safranek
29aa4c0ee8 Check content of volumes in snapshot/clone multivolume tests
Check that both original and its restored snapshot / clone have the same
content during the test.
2021-06-10 14:22:00 +02:00
Jan Safranek
68f139548b Remove unused parameters from TestConcurrentAccessToRelatedVolumes 2021-06-10 10:41:47 +02:00
Jan Safranek
28511e82ad Add e2e test for a volume + its clone used on the same node
CSI driver need to pass special mount opts to XFS filesystem to be able to
mount a volume + its clone or its restored snapshot on the same node. Add a
test to exhibit this behavior.

The test is optional for now, giving CSI drivers time to fix it.
2021-06-07 18:29:47 +02:00
Masaki Kimura
382f37142c storage e2e: auto detect sector size 2021-05-11 22:32:05 +00:00
Mauricio Poppe
5d9053014e Update tests to use common pod functions from framework/pod/utils.go 2021-03-11 07:25:56 +00:00
Jiawei Wang
356bea6c9f Add storage framework and address comments 2020-12-10 22:48:06 -08:00
Jiawei Wang
988563f8f5 Extract testsuite api to a separate package
Extract TestSuite, TestDriver, TestPattern, TestConfig
and VolumeResource, SnapshotVolumeResource from testsuite
package and put them into a new package called api.

The ultimate goal here is to make the testsuites as clean
as possible. And only testsuites in the package.
2020-12-10 11:12:51 -08:00
Jiawei Wang
5dc491758c Storage testsuite refactor & cleanup
Cleanup all the f.BeforeEach() before new framework to move all the
testskips in the new SkipUnsupportedTests() to make the structure easier.
And provide the standard way of RegisterTests()

Add a InitCustomXXXTestSuite(patterns []patterns) function for each
TestSuite to enable custom test suite definition.
2020-12-10 11:12:51 -08:00
Fabio Bertinatto
c82626f96f e2e: use custom timeouts in all storage E2E tests 2020-12-02 15:57:58 -03:00
Jing Xu
2a568c95dd Add linuxonly on one multivolume test
This test is not working for windows yet due to commands issued in pod
are not available for windows

Change-Id: Ia0b03afd6dfe0bbb1ab00dc821775450a7e8ce54
2020-11-18 11:58:12 -08:00
Jing Xu
079a4ea30c Mark some storage tests as LinuxOnly
Some storage tests has commands not available in Windows. Mark them as
LinuxOnly now. Will check later to see whether equivalent windows
commands are available.

Change-Id: I41b5668c855b2754a2e332cff4e90ebf2981aca0
2020-11-17 09:53:50 -08:00
Jing Xu
56373aa10d Update storage test suits for Windows
Update storage test suits to enable some tests on Windows

Change-Id: I1f596bb9f7a0f41ae398aec43406ee5c753cdce3
2020-11-11 15:22:47 -08:00
Niels de Vos
f2bf2ab76e e2e/storage: disable caching when writing/reading to block PVCs
By passing "oflag=nocache" and "iflag=direct", caching should be
disabled while writing/reading with "dd" to a block device. The
TestConcurrentAccessToSingleVolume() test is known to fail with certain
storage backends (like Ceph RBD) when caching is enabled.

The default BusyBox image used for testing does not support the required
options for "dd". So instead of running with BusyBox, run the test with
a Debian image.
2020-09-25 14:38:32 +02:00
Kubernetes Prow Robot
9e70d6f805
Merge pull request #91738 from jsafrane/fix-iscsi-metadata
iscsi: don't write json medata file when the volume is already mounted.
2020-07-04 16:06:48 -07:00
Matthew Cary
028176deb2 Avoid grabbing metrics when they're not validated
Change-Id: I0dd23b993b1bbc4908341d092c485566b9725c7a
2020-06-25 02:01:53 +00:00
Jan Safranek
62b7516b63 Add e2e test for read-only volume used by multiple pods 2020-06-08 09:38:11 +02:00
drfish
dfab6b637f Update .import-aliases for e2e test framework 2020-03-25 11:40:02 +08:00
Somtochi Onyekwere
ee41c6b1a4 Refactors MakeSecPods function 2020-03-12 07:14:08 +01:00
Michelle Au
76a4a34dae Pass NodeSelection directly into e2e testsuites so that tests can use them more consistently
Change-Id: I99c8c1d8535a2a2319fbe8216b953c14a56f2763
2020-02-11 20:25:24 -08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
tanjunchen
7ff3a1f8db test/e2e/framework: remove skip.go and use e2eskipper subpackage 2020-02-01 01:18:48 +08:00
Tomas Smetana
c42e815fb5 Fix multinode storage e2e tests for multizone clusters 2020-01-20 15:01:41 +01:00
yuxiaobo
73fb0ab5ec test/e2e/storage:Use e2eskipper package
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-13 14:04:10 +08:00
Patrick Ohly
160da35b23 e2e storage: public API for testsuites, support CSIInlineVolume type for generic resource
Implementing a test suite was impossible outside of the
k8s.io/kubernetes/test/e2e/storage/testsuites package because all
interfaces and structs used by them were private.

As part of revamping the API, genericVolumeTestResource also gets
exported because it is useful for other test suites. Because the
TestResource interface became obsolete a while ago and isn't used
anymore, the new name is just testsuites.VolumeResource.

testpatterns.CSIInlineVolume needs special handling in a few places.
It can now be used in a test pattern for a test suite that uses a
VolumeResource instance.
2019-12-05 20:10:25 +01: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
caiweidong
074aba8dce Fix storage e2e clean up 2019-11-06 23:42:20 +08:00
Dan Winship
6a040438ea Update test/e2e/storage for new GetReadySchedulableNodes stuff 2019-10-09 08:12:56 -04:00
hoyho
23320c958e feat(e2e): refactor hard-coded provision size
test/e2e/storage/testsuites creates volumes dynamically. Initially, the size of those volumes was
hard-coded in the test, which prevented using the tests with storage backends that couldn't support
that hard-coded size
2019-10-08 01:33:19 +08:00
Michelle Au
8d3abb83f9 Rename testCleanup to driverCleanup
Change-Id: I2ee50e2c7eed82724b7a2703819dcefcf7fa915f
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
Mucahit Kurt
f0aa13cd46 skip e2e tests that run on multi node cluster and require node independent volume for the drivers that does not support node independent volumes, like hostpath
Signed-off-by: Mucahit Kurt <mucahitkurt@gmail.com>
2019-09-13 22:49:53 +03: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
Michelle Au
33c213577e Skip preprovisioned and inline volume tests if driver supports dynamic provisioning.
Also remove FS VolMode disruptive tests because they are already covered
through the subpath disruptive test cases.

Change-Id: Ice4b30b0d8fdcb1f7fd61e54d27f53557de9f13a
2019-08-15 15:07:47 -07:00
Jan Safranek
d79b7c754f Add in-line filesystem volumes to MakeSecPod 2019-08-01 20:04:11 +00:00
Tomas Smetana
4f3e31e978 Revert "e2e: Skip multi-node PV test when pods scheduled on the same node"
This reverts commit d4f43e8e19.
2019-07-25 13:32:39 +02:00
Tomas Smetana
d4f43e8e19 e2e: Skip multi-node PV test when pods scheduled on the same node 2019-07-04 17:15:43 +02:00