mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
e2e: allow kubectlDelete
to succeed with NotFound
error
Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
17fea0459d
commit
eab2ec42bf
15
e2e/utils.go
15
e2e/utils.go
@ -1415,7 +1415,10 @@ func retryKubectlInput(namespace string, action kubectlAction, data string, t in
|
||||
if isRetryableAPIError(err) {
|
||||
return false, nil
|
||||
}
|
||||
if isAlreadyExistsCLIError(err) {
|
||||
if action == kubectlCreate && isAlreadyExistsCLIError(err) {
|
||||
return true, nil
|
||||
}
|
||||
if action == kubectlDelete && isNotFoundCLIError(err) {
|
||||
return true, nil
|
||||
}
|
||||
e2elog.Logf(
|
||||
@ -1451,7 +1454,10 @@ func retryKubectlFile(namespace string, action kubectlAction, filename string, t
|
||||
if isRetryableAPIError(err) {
|
||||
return false, nil
|
||||
}
|
||||
if isAlreadyExistsCLIError(err) {
|
||||
if action == kubectlCreate && isAlreadyExistsCLIError(err) {
|
||||
return true, nil
|
||||
}
|
||||
if action == kubectlDelete && isNotFoundCLIError(err) {
|
||||
return true, nil
|
||||
}
|
||||
e2elog.Logf(
|
||||
@ -1484,7 +1490,10 @@ func retryKubectlArgs(namespace string, action kubectlAction, t int, args ...str
|
||||
if isRetryableAPIError(err) {
|
||||
return false, nil
|
||||
}
|
||||
if isAlreadyExistsCLIError(err) {
|
||||
if action == kubectlCreate && isAlreadyExistsCLIError(err) {
|
||||
return true, nil
|
||||
}
|
||||
if action == kubectlDelete && isNotFoundCLIError(err) {
|
||||
return true, nil
|
||||
}
|
||||
e2elog.Logf(
|
||||
|
Reference in New Issue
Block a user