From 96e59cf19659caaf0852f2254005348e620a3981 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Fri, 31 Oct 2025 14:35:57 +0100 Subject: [PATCH] test: adjust to match new reality [ci skip] --- tests/integration/app_upgrade.bats | 25 +++++++++++++++++-------- tests/integration/recipe_release.bats | 6 ++++++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/tests/integration/app_upgrade.bats b/tests/integration/app_upgrade.bats index b0cfd183..be6b4829 100644 --- a/tests/integration/app_upgrade.bats +++ b/tests/integration/app_upgrade.bats @@ -256,7 +256,7 @@ teardown(){ } # bats test_tags=slow -@test "commit deploy upgrade is possible" { +@test "specific version upgrade after chaos deploy" { tagHash=$(_get_tag_hash "0.1.0+1.20.0") run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout "$tagHash" assert_success @@ -269,17 +269,26 @@ teardown(){ assert_success assert_output --regexp "CURRENT DEPLOYMENT.*${tagHash:0:8}" assert_output --regexp "ENV VERSION.*${tagHash:0:8}" + assert_output --regexp "NEW DEPLOYMENT.*0\.1\.1\+1\.20\.2" } -@test "chaos commit upgrade is possible" { - run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --no-input --no-converge-checks - assert_success - assert_output --partial '0.1.0+1.20.0' +# bats test_tags=slow +@test "upgrade to latest after chaos deploy" { + latestRelease=$(_latest_release) - tagHash=$(_get_tag_hash "0.2.0+1.21.0") - - run $ABRA app upgrade "$TEST_APP_DOMAIN" "$tagHash" --no-input --no-converge-checks + tagHash=$(_get_tag_hash "0.1.0+1.20.0") + run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout "$tagHash" assert_success + + run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --no-converge-checks --chaos + assert_success + assert_output --partial "${tagHash:0:8}" + + run $ABRA app upgrade "$TEST_APP_DOMAIN" --no-input --no-converge-checks + assert_success + assert_output --regexp "CURRENT DEPLOYMENT.*${tagHash:0:8}" + assert_output --regexp "ENV VERSION.*${tagHash:0:8}" + assert_output --partial "${latestRelease}" } # bats test_tags=slow diff --git a/tests/integration/recipe_release.bats b/tests/integration/recipe_release.bats index 81aff599..c9857278 100644 --- a/tests/integration/recipe_release.bats +++ b/tests/integration/recipe_release.bats @@ -101,6 +101,9 @@ teardown() { assert_success assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE/foo" + run $ABRA recipe sync "$TEST_RECIPE" --no-input --patch + assert_success + run $ABRA recipe release "$TEST_RECIPE" --no-input --patch assert_success assert_output --partial 'no -p/--publish passed, not publishing' @@ -119,6 +122,9 @@ teardown() { run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" commit -m "added some release notes" assert_success + run $ABRA recipe sync "$TEST_RECIPE" --no-input --patch + assert_success + run $ABRA recipe release "$TEST_RECIPE" --no-input --minor assert_success assert_output --partial 'no -p/--publish passed, not publishing'