diff --git a/tests/integration/app_check.bats b/tests/integration/app_check.bats index 425162eb..6d5ea1c9 100644 --- a/tests/integration/app_check.bats +++ b/tests/integration/app_check.bats @@ -103,7 +103,7 @@ teardown(){ run $ABRA app check "$TEST_APP_DOMAIN" --chaos assert_failure - assert_output --partial '.env.sample does not exist?' + assert_output --partial 'unable to discover .env.sample' } @test "error if missing env var" { diff --git a/tests/integration/app_ps.bats b/tests/integration/app_ps.bats index 3ed538ac..0e3f962c 100644 --- a/tests/integration/app_ps.bats +++ b/tests/integration/app_ps.bats @@ -53,10 +53,13 @@ teardown(){ # bats test_tags=slow @test "show ps report with chaos deploy" { - run $ABRA app deploy "$TEST_APP_DOMAIN" \ - --no-input --no-converge-checks --chaos + run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input --chaos assert_success + headHash=$(_get_head_hash) + + run $ABRA app ps "$TEST_APP_DOMAIN" + assert_success assert_output --partial "$latestRelease" - assert_output --partial 'true' # is a chaos deploy + assert_output --partial "${headHash:0:8}" # is a chaos deploy } diff --git a/tests/integration/app_rollback.bats b/tests/integration/app_rollback.bats index 1ab2f030..0ee13a5e 100644 --- a/tests/integration/app_rollback.bats +++ b/tests/integration/app_rollback.bats @@ -86,7 +86,7 @@ teardown(){ run $ABRA app rollback "$TEST_APP_DOMAIN" --no-input --no-converge-checks assert_success - assert_output --partial "you're on oldest" + assert_output --partial "no available downgrades" } # bats test_tags=slow diff --git a/tests/integration/app_undeploy.bats b/tests/integration/app_undeploy.bats index 3f9314a2..79fa80bf 100644 --- a/tests/integration/app_undeploy.bats +++ b/tests/integration/app_undeploy.bats @@ -39,8 +39,11 @@ teardown(){ # bats test_tags=slow @test "undeploy app" { - _deploy_app - _undeploy_app + run $ABRA app deploy "$TEST_APP_DOMAIN" --no-input + assert_success + + run $ABRA app undeploy "$TEST_APP_DOMAIN" --no-input + assert_success # NOTE(d1): ensure not chaos undeploy assert_output --partial 'false' diff --git a/tests/integration/app_upgrade.bats b/tests/integration/app_upgrade.bats index af4e9b64..4ca59f32 100644 --- a/tests/integration/app_upgrade.bats +++ b/tests/integration/app_upgrade.bats @@ -49,7 +49,7 @@ teardown(){ run $ABRA app upgrade "$TEST_APP_DOMAIN" --no-input --no-converge-checks assert_success - assert_output --partial "you're on latest" + assert_output --partial "no available upgrades" } # bats test_tags=slow diff --git a/tests/integration/dirs.bats b/tests/integration/dirs.bats index 894d7e94..79a1df27 100644 --- a/tests/integration/dirs.bats +++ b/tests/integration/dirs.bats @@ -40,12 +40,3 @@ setup(){ assert_not_exists "$ABRA_DIR/catalogue" } - -@test "catalogue recipe is a git repository" { - run $ABRA recipe fetch "$TEST_RECIPE" - assert_success - assert_output --partial 'local recipe catalogue is missing' - - assert_exists "$ABRA_DIR/catalogue" - assert_exists "$ABRA_DIR/catalogue/.git" -} diff --git a/tests/integration/recipe_release.bats b/tests/integration/recipe_release.bats index 7bcb2822..e8c0df2c 100644 --- a/tests/integration/recipe_release.bats +++ b/tests/integration/recipe_release.bats @@ -29,7 +29,7 @@ teardown() { run $ABRA recipe release DOESNTEXIST --no-input assert_failure - assert_output --partial 'unable to validate recipe' + assert_output --partial 'unable to clone DOESNTEXIST' } @test "release patch bump" { diff --git a/tests/integration/recipe_sync.bats b/tests/integration/recipe_sync.bats index 39a4c262..8f401905 100644 --- a/tests/integration/recipe_sync.bats +++ b/tests/integration/recipe_sync.bats @@ -28,7 +28,7 @@ teardown(){ run $ABRA recipe sync DOESNTEXIST --no-input assert_failure - assert_output --partial 'unable to validate recipe' + assert_output --partial 'unable to clone DOESNTEXIST' } @test "allow unstaged changes" { diff --git a/tests/integration/recipe_upgrade.bats b/tests/integration/recipe_upgrade.bats index 13d9fb4c..3edd7614 100644 --- a/tests/integration/recipe_upgrade.bats +++ b/tests/integration/recipe_upgrade.bats @@ -28,7 +28,7 @@ teardown(){ run $ABRA recipe upgrade DOESNTEXIST --no-input assert_failure - assert_output --partial 'unable to validate recipe' + assert_output --partial 'unable to clone DOESNTEXIST' } @test "retrieve recipe if missing" { diff --git a/tests/integration/recipe_version.bats b/tests/integration/recipe_version.bats index 42d2e4d0..ee5840ff 100644 --- a/tests/integration/recipe_version.bats +++ b/tests/integration/recipe_version.bats @@ -11,10 +11,12 @@ setup() { assert_output --partial '2.3.2+1.20.3-rootless' } -@test "error if not present in catalogue" { +@test "local tags used if no catalogue entry" { + latestRelease=$(git -C "$ABRA_DIR/recipes/$TEST_RECIPE" tag -l | tail -n 1) + run $ABRA recipe versions "$TEST_RECIPE" - assert_failure - assert_output --partial "is not published on the catalogue" + assert_success + assert_output --partial "$latestRelease" } @test "versions listed in correct order" {