Commit Graph

8 Commits (k3s-v1.15.3)

Author SHA1 Message Date
Patrick Ohly 093027c891 e2e/storage: ensure that also external storage classes are unique
One previously undocumented expectation is that
GetDynamicProvisionStorageClass can be called more than once per test
and then each time returns a new, unique storage class. The in-memory
implementation in driveroperations.go:GetStorageClass ensured that,
but loading from a .yaml file didn't. This caused the multivolume tests
to fail when applied to an already installed GCE driver with the
-storage.testdriver parameter.
2019-05-09 08:53:25 +02:00
Michelle Au bb8c1b144c add multivolume suite to external storage test suite
Change-Id: I59e529956e8cd40a948b2d21395b4b3c33b212bf
2019-05-01 11:35:46 -07:00
Matthew Wong 51db6cb093 Use e2e.test instead of test/e2e in example invocations 2019-04-23 15:59:54 -04:00
Masaki Kimura b474b28f7b Use framework.ExpectNoError() for rest of under test/e2e/storage 2019-04-04 18:51:51 +00:00
Andrew Sy Kim 4ac9feb7f9 test/e2e: replace legacy scheme with client-go scheme
Signed-off-by: Andrew Sy Kim <kiman@vmware.com>
2019-04-02 10:08:55 -04:00
Patrick Ohly e84271ed8a e2e/storage: allow empty volume type
This can happen when the test pattern is about snapshotting.
2019-03-07 16:57:16 +01:00
Patrick Ohly 915d6365f1 e2e/storage: fix snapshot support in external driver testing
When using an already installed driver, the snapshot name is the
original driver name. Renaming was incorrectly copied from the in-tree
CSI hostpath driver.
2019-03-07 15:45:40 +01:00
Patrick Ohly 6644db9914 e2e/storage: testing of external storage drivers
It is useful to apply the storage testsuite also to "external" (=
out-of-tree) storage drivers. One way of doing that is setting up a
custom E2E test suite, but that's still quite a bit of work.

An easier alternative is to parameterize the Kubernetes e2e.test
binary at runtime so that it instantiates the testsuite for one or
more drivers. Some parameters have to be provided before starting the
test because they define configuration and capabilities of the driver
and its storage backend that cannot be discovered at runtime. This is
done by populating the DriverDefinition with the content of the file
that the new -storage.testdriver parameters points to.

The universal .yaml and .json decoder from Kubernetes is used. It's
flexible, but has some downsides:
- currently ignores unknown fields (see https://github.com/kubernetes/kubernetes/pull/71589)
- poor error messages when fields have the wrong type

Storage drivers have to be installed in the test cluster before
starting e2e.test. Only tests involving dynamically provisioned
volumes are currently supported.
2019-03-06 22:06:31 +01:00