fix: app version includes tags, sorts & tests

See coop-cloud/organising#442
This commit is contained in:
2023-09-24 11:18:56 +02:00
parent bf648eeb5d
commit f3ded88ed8
2 changed files with 51 additions and 16 deletions

View File

@ -58,26 +58,46 @@ teardown(){
}
# bats test_tags=slow
@test "error if no version in catalogue" {
@test "error if not in catalogue" {
_deploy_app
run $ABRA app version "$TEST_APP_DOMAIN"
assert_failure
assert_output --partial 'could not retrieve deployed version'
assert_output --partial 'does not exist'
_undeploy_app
}
# bats test_tags=slow
@test "list version" {
_deploy_app
appDomain="custom-html.$TEST_SERVER"
latestVersion=$(git -C "$ABRA_DIR/recipes/$TEST_RECIPE" tag | tail -n 1)
run $ABRA app new custom-html \
--no-input \
--server "$TEST_SERVER" \
--domain "$appDomain"
latestVersion=$(git -C "$ABRA_DIR/recipes/custom-html" tag | tail -n 1)
refute [ -z "$latestVersion" ];
run $ABRA app version "$TEST_APP_DOMAIN"
run $ABRA app deploy "$appDomain" --no-input --no-converge-checks
assert_success
assert_output --partial "$latestVersion"
_undeploy_app
run $ABRA app version "$appDomain"
assert_success
assert_output --partial "$latestVersion"
run $ABRA app undeploy "$appDomain" --no-input
assert_success
# NOTE(d1): to let the stack come down before nuking volumes
sleep 3
run $ABRA app volume remove "$appDomain" --no-input
assert_success
run $ABRA app remove "$appDomain" --no-input
assert_success
assert_not_exists "$ABRA_DIR/servers/$TEST_SERVER/$appDomain.env"
}