test: check new deploy overview stuff

This commit is contained in:
3wc
2025-09-08 14:45:04 -04:00
parent e73b0cc2fc
commit 0a45424658

View File

@ -41,6 +41,8 @@ teardown(){
assert_output --partial 'CURRENT DEPLOYMENT N/A'
assert_output --partial 'ENV VERSION N/A'
assert_output --partial "NEW DEPLOYMENT ${latestRelease}"
assert_output --partial "IMAGES nginx: ${latestRelease##*+} (new)"
assert_output --partial "CONFIGS test_conf: v1 (new)"
run grep -q "TYPE=$TEST_RECIPE:${latestRelease}" \
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
@ -58,12 +60,35 @@ teardown(){
assert_output --partial "CURRENT DEPLOYMENT N/A"
assert_output --partial "ENV VERSION ${latestRelease}"
assert_output --partial "NEW DEPLOYMENT ${latestRelease}"
assert_output --partial "IMAGES nginx: ${latestRelease##*+} (new)"
assert_output --partial "CONFIGS test_conf: v1 (new)"
run grep -q "TYPE=$TEST_RECIPE:${latestRelease}" \
"$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
assert_success
}
# bats test_tags=slow
@test "show changed config version on re-deploy" {
run $ABRA app deploy "$TEST_APP_DOMAIN" \
--no-input --no-converge-checks
assert_success
run sed -i 's/TEST_CONF_VERSION=v1/TEST_CONF_VERSION=v2/' \
"$ABRA_DIR/recipes/$TEST_RECIPE/abra.sh" \
assert_success
cat "$ABRA_DIR/recipes/$TEST_RECIPE/abra.sh"
run $ABRA app deploy "$TEST_APP_DOMAIN" \
--no-input --no-converge-checks --force --chaos
assert_success
assert_output --partial "CONFIGS test_conf: v1 → v2"
_checkout_recipe
}
# bats test_tags=slow
@test "deploy, re-deploy, choose env version" {
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.1+1.20.2" \