Commit Graph

62 Commits

Author SHA1 Message Date
torredil
25389ee0ee
Add nodeSelector to e2e storage testing pods
Signed-off-by: torredil <torredil@amazon.com>
2023-02-06 16:00:51 +00:00
Patrick Ohly
db394db398 e2e: move several timeouts from TestContext into TimeoutContext
This consolidates timeout handling. In the future, configuration of all
timeouts via a configuration file might get added. For now, the same three
legacy command line flags for the timeouts that get moved continue to be
supported.
2023-01-09 17:29:35 +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
d8d3dc9476 e2e storage: eliminate explicit test driver cleanup
Cleanup can be handled inside the setup code with ginkgo.DeferCleanup. This
simplifies the code.
2022-10-20 13:56:59 +02:00
Patrick Ohly
2d21acb1be e2e framework: eliminate redundant framework/[log|ginkgowrapper]
These sub packages were created by mistake. Logging and failure handling are
core features and must be implemented in the framework package.
2022-10-06 08:16:47 +02:00
Joe Betz
7be77f9ecc changes code to improve output for files under test/e2e/storage 2022-09-02 17:43:41 +05:30
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
Jonathan Dobson
f369b1234a e2e: add storage capability for offline volume expansion 2022-04-21 14:49:18 -06:00
ahrtr
fe95aa614c io/ioutil has already been deprecated in golang 1.16, so replace all ioutil with io and os 2022-02-03 05:32:12 +08:00
lzj
7cf30d5690 fix/remove-errors-pkg 2021-06-24 16:09:59 +08:00
Hemant Kumar
95c8b02096 Add explicit capability for online volume expansion 2021-06-07 13:43:18 -04:00
Kubernetes Prow Robot
17f3990ea1
Merge pull request #100484 from gavinfish/e2e-storage-suffix
Remove suffixes for VolumeSnapshotClasses in E2E tests
2021-04-26 17:37:03 -07:00
shahra
34e4a5f22c Add e2e test to validate performance metrics of volume lifecycle operations.
This test currently validates latency and throughput of volume
provisioning against a high baseline.
2021-03-24 13:50:32 -07:00
drfish
244d7a5d67 Remove suffixes for VolumeSnapshotClasses in E2E tests 2021-03-23 21:24:28 +08:00
Patrick Ohly
a255b74d11 test: fix skipping of GenericEphemeralVolume volume type
The test should run for test drivers which support dynamic
provisioning, but was skipped because of the volume type check:

External Storage [Driver: hostpath.csi.k8s.io]
[90m/home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/external/external.go:175
  [Testpattern: Generic Ephemeral-volume (default fs) [Feature:GenericEphemeralVolume] (late-binding)] ephemeral
  [90m/home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/framework/testsuite.go:50
    [36mshould support multiple inline ephemeral volumes [BeforeEach]
    [90m/home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/testsuites/ephemeral.go:211

    [36mDriver "hostpath.csi.k8s.io" does not support volume type "GenericEphemeralVolume" - skipping

    /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/external/external.go:255
2021-02-25 10:09:40 +01:00
Manohar Reddy
a6ec62f76d add e2e tests for DeleteSnapshotsecrets 2021-02-04 10:46:00 +05:30
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
Kubernetes Prow Robot
ae287e848b
Merge pull request #97001 from Jiawei0227/copySC
Copy the same storageclass instead of constructing one in external test
2020-12-08 21:06:07 -08:00
Kubernetes Prow Robot
31d55baf63
Merge pull request #96875 from Jiawei0227/externaldriver2
Remove external driver duplicated misleading SupportedSizeRange
2020-12-08 20:04:24 -08:00
Kubernetes Prow Robot
dbe67deb2b
Merge pull request #96843 from Jiawei0227/externaldriver
Remove unnecessary snapshot ability check for external driver
2020-12-08 20:03:59 -08:00
Jiawei Wang
8c17534429 Copy the same storageclass instead of constructing one in external test 2020-12-03 19:52:32 -08:00
Fabio Bertinatto
f6e900f468 e2e: add custom timeouts support in external storage drivers 2020-12-02 15:57:58 -03:00
Jiawei Wang
6f74a7cbfa Remove external driver duplicated misleading SupportedSizeRange 2020-11-25 16:07:55 -08:00
Jiawei Wang
24aa872a2a Remove unnecessary snapshot ability check 2020-11-24 16:58:14 -08:00
Andi Li
d915463451 Combine switch case into one case 2020-08-28 12:36:15 -04:00
Andi Li
e78aee9965 Add pre provisioned snapshot tests
Make pre provisioned snapshots using CSI driver by
1. Take a dynamic snapshot with retain policy
2. Delete the dynamic snapshot and content
3. Create a preprovisioned snapshot with snapshotHandle

This commit adds a preprovisiond test pattern, all snapshots made using
create snapshot resource become prepv snapshots. All exisitng test cases
now run again with prepv snapshots.
2020-08-28 12:36:15 -04:00
Kubernetes Prow Robot
9978c281ec
Merge pull request #90773 from gnufied/fix-csi-e2e-orphans
Fix CSI e2e leaving pods in terminating state
2020-05-13 22:14:21 -07:00
Hemant Kumar
da941d8d3e Create mock CSI driver resources in different namespace 2020-05-13 11:16:00 -04:00
Saikat Roychowdhury
dcfaaefc60 Pickup Snapshot Provisioner from the snapshot class "driver" info.
When using FromFile or FromExisitingClass options, snapshot provisioner
should be picked up from the "driver" tag of VolumeSnapshotClass object.
2020-05-08 05:45:36 +00:00
Michelle Au
e132b77ae4 Add stress test to repeatedly restart Pods with PVCs in parallel
Change-Id: I499571cc86b1058d0e16d79e5e998d1dedfd9a4a
2020-04-15 18:10:35 -07:00
drfish
dfab6b637f Update .import-aliases for e2e test framework 2020-03-25 11:40:02 +08:00
Jordan Liggitt
b7c2faf26c client-go dynamic client: add context to callers 2020-03-06 10:56:23 -05:00
Masaki Kimura
401b85e547 Add FromFile and FromExistingClassName support for SnapshotClass in external storage e2e test 2020-03-03 20:28:32 +00: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
Michelle Au
0c40daddb0 Add an option to external storage e2es to use a copy of a pre-installed StorageClass
Change-Id: I9d7f0384d0071caa41a8d98eea4afa5b17ad0ea3
2020-02-03 17:45:17 -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
Patrick Ohly
3cc926f5ef e2e storage: fix type in comment 2019-12-09 16:46:45 +01:00
Patrick Ohly
17ae1eda3e e2e storage: improve instructions for external driver testing
Some of the content was out-dated (`ShortName` was removed,
`dataSource` renamed). Better refer to the actual definitions with
functional links.

To make it simpler to find those, `driverDefinition` gets moved up in
`external.go`.
2019-12-09 15:20:13 +01:00
tanjunchen
9eda99793d use ExpectEqual of framework in test/e2e/storage 2019-12-03 17:41:49 +08:00
clarklee92
78d3d52ac2 Move funcs of create.go to e2e/storage
Signed-off-by: clarklee92 <clarklee1992@hotmail.com>
2019-11-01 13:52:24 +08: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
Kubernetes Prow Robot
c4ccb623e8
Merge pull request #80247 from jsafrane/e2e-volume-limits
Add e2e test for CSI volume limits
2019-08-28 18:25:56 -07:00
Patrick Ohly
5088b2ee2f e2e storage: read/write + read-only ephemeral inline volume test, data sharing
The assumption so far was that all drivers support read/write
volumes. That might not necessarily be true, so we have to let the
test driver specify it and then test accordingly.

Another aspect that is worth testing is whether the driver correctly
creates a new volume for each pod even if the volume attributes are
the same. However, drivers are not required to do that, so again we
have to let the test driver specify that.
2019-08-28 12:20:54 +02:00
Jan Safranek
90d09919e8 Add e2e test for volume limits
The test creates as many PVs and pods as the driver/plugin reports to support on a
single node.
2019-08-28 10:39:08 +02:00
Masaki Kimura
f1d2d9d670 Move disruptive tests to testsuites and add ones for block volume 2019-08-01 20:04:10 +00:00
Patrick Ohly
555ff7ef10 CSI: allow drivers that can handle persistent and ephemeral volumes
The conceptual change is that the mode in which a volume gets handled
is derived from it's spec, not from the ability of the driver. In
practice, that is already how the code worked because it didn't
actually look at CSIDriver.Spec.Mode at all.

Therefore the code change itself is mostly just renaming "driver mode"
to "volume mode". In some places (CanDeviceMount, CanAttach) the
feature check that was used elsewhere seemed to be missing. Now their
code path for ephemeral volumes are also only entered if that feature
is enabled.

The sanity check whether a CSI driver is being used correctly still
needs to be implemented.

Related-to: https://github.com/kubernetes/kubernetes/issues/79624
2019-07-25 16:45:46 +02:00
Patrick Ohly
be9f9091ca e2e: remove unused ShortName from external driver definition
The name was meant to be used as shorter replacement for potentially
long CSI driver names, but was never used in practice.
2019-07-25 16:45:46 +02:00