Skip to content

Commit 1a6977a

Browse files
committed
Register cluster deletion after successful creation
Signed-off-by: Pete Wall <pete.wall@grafana.com>
1 parent f1c9c63 commit 1a6977a

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tools/helm-test/helm-test

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ if [ "${CREATE_CLUSTER}" == "true" ]; then
4141
"${scriptDir}/create-cluster" "${testDir}"
4242
fi
4343

44+
deleteCluster() {
45+
"${scriptDir}/delete-cluster" "${testDir}"
46+
}
47+
48+
DELETE_CLUSTER=${DELETE_CLUSTER:-false}
49+
if [ "${DELETE_CLUSTER}" == "true" ]; then
50+
trap deleteCluster EXIT
51+
fi
52+
4453
"${scriptDir}/deploy-dependencies" "${testDir}"
4554

4655
"${scriptDir}/deploy-subject" "${testDir}"
@@ -51,12 +60,3 @@ if [ "${runUninstall}" == "true" ]; then
5160
fi
5261

5362
"${scriptDir}/run-tests" "${testDir}"
54-
55-
deleteCluster() {
56-
"${scriptDir}/delete-cluster" "${testDir}"
57-
}
58-
59-
DELETE_CLUSTER=${DELETE_CLUSTER:-false}
60-
if [ "${DELETE_CLUSTER}" == "true" ]; then
61-
trap deleteCluster EXIT
62-
fi

0 commit comments

Comments
 (0)