test: fixups for the changepocalypse

This commit is contained in:
2024-07-09 09:41:49 +02:00
parent c33ca1c6bc
commit addbda9145
10 changed files with 22 additions and 23 deletions
+1 -1
View File
@@ -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" {
+6 -3
View File
@@ -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
}
+1 -1
View File
@@ -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
+5 -2
View File
@@ -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'
+1 -1
View File
@@ -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
-9
View File
@@ -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"
}
+1 -1
View File
@@ -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" {
+1 -1
View File
@@ -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" {
+1 -1
View File
@@ -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" {
+5 -3
View File
@@ -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" {