Commit Graph

8 Commits

Author SHA1 Message Date
Hemant Kumar
fb9db79d3f Enable volume expansion tests for generic ephemeral volumes 2022-05-23 21:58:34 -04:00
Kubernetes Prow Robot
7fbb384e15
Merge pull request #105682 from pohly/generic-ephemeral-volume-raw-block
storage validation: accept generic ephemeral volumes as volume device
2021-10-22 18:04:50 -07:00
Patrick Ohly
5462d97e62 storage e2e: test snapshotting of generic ephemeral volumes
Conceptually, snapshots have to be taken while the pod and thus the volume
exist. Snapshotting has an issue where flushing of data is not guaranteed while
the volume is still staged on the node, so the test relied on deleting the pod
and checking for the volume to be unused. That part of the test cannot be done
for ephmeral volumes.
2021-10-19 14:01:21 +02:00
Patrick Ohly
a90a3c6a9c storage e2e: check raw block support for generic ephemeral volumes
This adds a new test pattern and uses it for the inline volume tests. Because
the kind of volume now varies more, validation of the mount or block device is
always done by the caller of TestEphemeral.
2021-10-19 13:30:32 +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
Patrick Ohly
25f4174148 testdata: drop the alpha EphemeralVolumeSource.ReadOnly field
This is the result of
   UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test k8s.io/api
after removing the ReadOnly field from the API. The test data
for older releases must be updated because the current code
no longer supports that field.

The removal itself is okay because the struct was declared
as alpha.

Because EphemeralVolumeSource is embedded quite a lot, different types
are affected. Here is one example:

       --- FAIL: TestCompatibility/extensions.v1beta1.DaemonSet/v1.20.0 (0.04s)
            compatibility.go:476: json differs
            compatibility.go:477:   string{
                  	... // 12941 identical bytes
                  	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, //  |               }|
                  	0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, //  |.              }|
                - 	0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, // -|,.              |
                - 	0x22, 0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x22, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, // -|"readOnly": true|
                  	0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, //  |.            }. |
                  	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, //  |         }.     |
                  	... // 31426 identical bytes
                  }

            compatibility.go:482: yaml differs
            compatibility.go:483:   string{
                  	... // 22893 identical bytes
                  	0x34, 0x22, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x70, 0x68, 0x65, 0x6d, //  |4".        ephem|
                  	0x65, 0x72, 0x61, 0x6c, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, //  |eral:.          |
                - 	0x72, 0x65, 0x61, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x3a, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0a, 0x20, // -|readOnly: true. |
                - 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,                                           // -|         |
                  	0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x65, 0x6d, 0x70, 0x6c, //  |volumeClaimTempl|
                  	0x61, 0x74, 0x65, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, //  |ate:.           |
                  	... // 5965 identical bytes
                  }

            compatibility.go:488: proto differs
            compatibility.go:490:   (
                  	"""
                  	... // 459 identical lines
                  	                }
                  	              }
                - 	              2: 1
                  	            }
                  	          }
                  	... // 1083 identical lines
                  	"""
                  )

            compatibility.go:506: wrote expected compatibility data... verify, commit, and rerun tests
2021-03-09 08:24:52 +01:00
wojtekt
ca333d7a7a Tag storage windows tests with [Feature:Windows] instead of [sig-windows] 2021-03-03 12:08:59 +01:00
Jiawei Wang
356bea6c9f Add storage framework and address comments 2020-12-10 22:48:06 -08:00