diff --git a/acceptance/bundle/deployment/bind/schema/output.txt b/acceptance/bundle/deployment/bind/schema/output.txt index f00043b2d..df30475e6 100644 --- a/acceptance/bundle/deployment/bind/schema/output.txt +++ b/acceptance/bundle/deployment/bind/schema/output.txt @@ -35,4 +35,4 @@ Destroy complete! } === Test cleanup: -=== Delete the pre-defined schema: 0 +=== Delete the pre-defined schema test-schema-[UUID]: 0 diff --git a/acceptance/bundle/deployment/bind/schema/script b/acceptance/bundle/deployment/bind/schema/script index 48094ebef..31d661b0b 100644 --- a/acceptance/bundle/deployment/bind/schema/script +++ b/acceptance/bundle/deployment/bind/schema/script @@ -9,6 +9,14 @@ title "Create a pre-defined schema: " CATALOG_NAME=main $CLI schemas create ${SCHEMA_NAME} ${CATALOG_NAME} | jq '{full_name, catalog_name, comment}' +cleanupRemoveSchema() { + title "Test cleanup: " + title "Delete the pre-defined schema ${SCHEMA_NAME}: " + $CLI schemas delete ${CATALOG_NAME}.${SCHEMA_NAME} + echo $? +} +trap cleanupRemoveSchema EXIT + title "Bind schema: " $CLI bundle deployment bind schema1 ${CATALOG_NAME}.${SCHEMA_NAME} --auto-approve @@ -26,8 +34,3 @@ $CLI bundle destroy --auto-approve title "Read the pre-defined schema again (expecting it still exists): " $CLI schemas get ${CATALOG_NAME}.${SCHEMA_NAME} | jq '{full_name, catalog_name, comment}' - -title "Test cleanup: " -title "Delete the pre-defined schema: " -$CLI schemas delete ${CATALOG_NAME}.${SCHEMA_NAME} -echo $? \ No newline at end of file