mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
e2e: allow RWOP tests to fail
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
b82af7559b
commit
5e66372e31
19
e2e/utils.go
19
e2e/utils.go
@ -1492,3 +1492,22 @@ func retryKubectlArgs(namespace string, action kubectlAction, t int, args ...str
|
||||
return true, nil
|
||||
})
|
||||
}
|
||||
|
||||
// rwopSupported indicates that a test using RWOP is expected to succeed. If
|
||||
// the accessMode is reported as invalid, rwopSupported will be set to false.
|
||||
var rwopSupported = true
|
||||
|
||||
// rwopMayFail returns true if the accessMode is not valid. k8s v1.22 requires
|
||||
// a feature gate, which might not be set. In case the accessMode is invalid,
|
||||
// the featuregate is not set, and testing RWOP is not possible.
|
||||
func rwopMayFail(err error) bool {
|
||||
if !rwopSupported {
|
||||
return true
|
||||
}
|
||||
|
||||
if strings.Contains(err.Error(), `invalid: spec.accessModes: Unsupported value: "ReadWriteOncePod"`) {
|
||||
rwopSupported = false
|
||||
}
|
||||
|
||||
return !rwopSupported
|
||||
}
|
||||
|
Reference in New Issue
Block a user