diff --git a/tempest/templates/bin/_run-tests.sh.tpl b/tempest/templates/bin/_run-tests.sh.tpl index 11f91fa4d0..2b1da0a1c4 100644 --- a/tempest/templates/bin/_run-tests.sh.tpl +++ b/tempest/templates/bin/_run-tests.sh.tpl @@ -18,12 +18,16 @@ limitations under the License. set -ex +{{ if .Values.conf.cleanup.enabled }} tempest cleanup --init-saved-state if [ "true" == "{{- .Values.conf.cleanup.force -}}" ]; then trap "tempest cleanup; exit" 1 ERR fi +{{- end }} {{ .Values.conf.script }} +{{ if .Values.conf.cleanup.enabled }} tempest cleanup +{{- end }} diff --git a/tempest/values.yaml b/tempest/values.yaml index fd4b632edf..0ff3627c93 100644 --- a/tempest/values.yaml +++ b/tempest/values.yaml @@ -200,6 +200,7 @@ conf: api_v3: True cleanup: force: false + enabled: true pvc: enabled: true