openstack-helm/tempest/templates/bin/_run-tests.sh.tpl
Kaustuv Royburman 3836899a26 Prevent resource deletion in Live Lab
The tempest utility that is configured here will take a snapshot.
After the snapashot and test run it will delete any resources that
are not in the snapshot.

If a tenant creates a resource outside of the test run it will also
be deleted.

This is something which is not desirable in a live lab.

This patch aims to provide control to the end-user to define how
to perform the final cleanup.

Change-Id: I1f7eb3ac5e9f9be08cb05a70bb1fb2d0f4b41382
2018-09-07 05:35:49 +00:00

34 lines
876 B
Smarty

#!/bin/bash
{{/*
Copyright 2017 The Openstack-Helm Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
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 }}