mirror of https://github.com/k3s-io/k3s
CRIDriverRegistry e2e: Clarify variable name
Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>pull/564/head
parent
1ac3b37848
commit
81bc0e5ec8
|
@ -205,22 +205,22 @@ var _ = utils.SIGDescribe("CSI Volumes", func() {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
driverAttachable bool
|
driverAttachable bool
|
||||||
driverExists bool
|
deployDriverCRD bool
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "should not require VolumeAttach for drivers without attachment",
|
name: "should not require VolumeAttach for drivers without attachment",
|
||||||
driverAttachable: false,
|
driverAttachable: false,
|
||||||
driverExists: true,
|
deployDriverCRD: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "should require VolumeAttach for drivers with attachment",
|
name: "should require VolumeAttach for drivers with attachment",
|
||||||
driverAttachable: true,
|
driverAttachable: true,
|
||||||
driverExists: true,
|
deployDriverCRD: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "should preserve attachment policy when no CSIDriver present",
|
name: "should preserve attachment policy when no CSIDriver present",
|
||||||
driverAttachable: true,
|
driverAttachable: true,
|
||||||
driverExists: false,
|
deployDriverCRD: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,11 +233,11 @@ var _ = utils.SIGDescribe("CSI Volumes", func() {
|
||||||
Prefix: "csi-attach",
|
Prefix: "csi-attach",
|
||||||
}
|
}
|
||||||
|
|
||||||
driver = drivers.InitMockCSIDriver(config, test.driverExists, test.driverAttachable, nil)
|
driver = drivers.InitMockCSIDriver(config, test.deployDriverCRD, test.driverAttachable, nil)
|
||||||
driver.CreateDriver()
|
driver.CreateDriver()
|
||||||
defer driver.CleanupDriver()
|
defer driver.CleanupDriver()
|
||||||
|
|
||||||
if test.driverExists {
|
if test.deployDriverCRD {
|
||||||
defer destroyCSIDriver(csics, driver)
|
defer destroyCSIDriver(csics, driver)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,37 +308,37 @@ var _ = utils.SIGDescribe("CSI Volumes", func() {
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
podInfoOnMountVersion *string
|
podInfoOnMountVersion *string
|
||||||
driverExists bool
|
deployDriverCRD bool
|
||||||
expectPodInfo bool
|
expectPodInfo bool
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
name: "should not be passed when podInfoOnMountVersion=nil",
|
name: "should not be passed when podInfoOnMountVersion=nil",
|
||||||
podInfoOnMountVersion: nil,
|
podInfoOnMountVersion: nil,
|
||||||
driverExists: true,
|
deployDriverCRD: true,
|
||||||
expectPodInfo: false,
|
expectPodInfo: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "should be passed when podInfoOnMountVersion=v1",
|
name: "should be passed when podInfoOnMountVersion=v1",
|
||||||
podInfoOnMountVersion: &podInfoV1,
|
podInfoOnMountVersion: &podInfoV1,
|
||||||
driverExists: true,
|
deployDriverCRD: true,
|
||||||
expectPodInfo: true,
|
expectPodInfo: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "should not be passed when podInfoOnMountVersion=<empty string>",
|
name: "should not be passed when podInfoOnMountVersion=<empty string>",
|
||||||
podInfoOnMountVersion: &podInfoEmpty,
|
podInfoOnMountVersion: &podInfoEmpty,
|
||||||
driverExists: true,
|
deployDriverCRD: true,
|
||||||
expectPodInfo: false,
|
expectPodInfo: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "should not be passed when podInfoOnMountVersion=<unknown string>",
|
name: "should not be passed when podInfoOnMountVersion=<unknown string>",
|
||||||
podInfoOnMountVersion: &podInfoUnknown,
|
podInfoOnMountVersion: &podInfoUnknown,
|
||||||
driverExists: true,
|
deployDriverCRD: true,
|
||||||
expectPodInfo: false,
|
expectPodInfo: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "should not be passed when CSIDriver does not exist",
|
name: "should not be passed when CSIDriver does not exist",
|
||||||
driverExists: false,
|
deployDriverCRD: false,
|
||||||
expectPodInfo: false,
|
expectPodInfo: false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
for _, t := range tests {
|
for _, t := range tests {
|
||||||
|
@ -350,11 +350,11 @@ var _ = utils.SIGDescribe("CSI Volumes", func() {
|
||||||
Prefix: "csi-workload",
|
Prefix: "csi-workload",
|
||||||
}
|
}
|
||||||
|
|
||||||
driver = drivers.InitMockCSIDriver(config, test.driverExists, true, test.podInfoOnMountVersion)
|
driver = drivers.InitMockCSIDriver(config, test.deployDriverCRD, true, test.podInfoOnMountVersion)
|
||||||
driver.CreateDriver()
|
driver.CreateDriver()
|
||||||
defer driver.CleanupDriver()
|
defer driver.CleanupDriver()
|
||||||
|
|
||||||
if test.driverExists {
|
if test.deployDriverCRD {
|
||||||
defer destroyCSIDriver(csics, driver)
|
defer destroyCSIDriver(csics, driver)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue