refactor/fix: deploy/upgrade/rollback

See coop-cloud/abra#461
This commit is contained in:
2025-01-01 19:15:22 +01:00
parent 5975be6870
commit b0cd8ccbb9
85 changed files with 783 additions and 7118 deletions

View File

@ -33,6 +33,16 @@ teardown(){
assert_failure
}
@test "retrieve recipe if missing" {
run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE"
assert_success
assert_not_exists "$ABRA_DIR/recipes/$TEST_RECIPE"
run $ABRA app upgrade "$TEST_APP_DOMAIN" --no-input --no-converge-checks
assert_failure
assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE"
}
# bats test_tags=slow
@test "error if specific version is not an upgrade" {
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --no-input --no-converge-checks
@ -118,6 +128,19 @@ teardown(){
assert_output --partial '0.2.0+1.21.0'
}
@test "force upgrade with no available upgrades" {
run $ABRA app deploy "$TEST_APP_DOMAIN" \
--no-input --no-converge-checks
assert_success
latestRelease=$(_latest_release)
run $ABRA app upgrade "$TEST_APP_DOMAIN" \
--force --no-input --no-converge-checks
assert_success
assert_output --partial "$latestRelease"
}
# bats test_tags=slow
@test "upgrade to latest" {
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --no-input --no-converge-checks