diff --git a/tempest/templates/bin/_run-tests.sh.tpl b/tempest/templates/bin/_run-tests.sh.tpl index 7d0bb34525..11f91fa4d0 100644 --- a/tempest/templates/bin/_run-tests.sh.tpl +++ b/tempest/templates/bin/_run-tests.sh.tpl @@ -20,6 +20,10 @@ set -ex tempest cleanup --init-saved-state +if [ "true" == "{{- .Values.conf.cleanup.force -}}" ]; then +trap "tempest cleanup; exit" 1 ERR +fi + {{ .Values.conf.script }} tempest cleanup diff --git a/tempest/values.yaml b/tempest/values.yaml index 3dcd83a4ca..d64642b562 100644 --- a/tempest/values.yaml +++ b/tempest/values.yaml @@ -198,6 +198,8 @@ conf: volume-feature-enabled: api_v1: False api_v3: True + cleanup: + force: false pvc: enabled: true