test: adjust integration suite
This commit is contained in:
@ -250,6 +250,7 @@ teardown(){
|
|||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
||||||
--no-input --no-converge-checks --chaos
|
--no-input --no-converge-checks --chaos
|
||||||
assert_success
|
assert_success
|
||||||
|
assert_output --regexp "NEW DEPLOYMENT.*${_get_head_hash:0:8}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
|
@ -163,7 +163,7 @@ teardown(){
|
|||||||
assert_success
|
assert_success
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "can not redeploy chaos version without --chaos" {
|
@test "cannot redeploy chaos version without --chaos" {
|
||||||
headHash=$(_get_head_hash)
|
headHash=$(_get_head_hash)
|
||||||
latestRelease=$(_latest_release)
|
latestRelease=$(_latest_release)
|
||||||
|
|
||||||
@ -181,7 +181,7 @@ teardown(){
|
|||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
||||||
--no-input --no-converge-checks --force --debug
|
--no-input --no-converge-checks --force --debug
|
||||||
assert_failure
|
assert_failure
|
||||||
assert_output --regexp 'can not redeploy chaos version .*' + "${headHash:0:8}+U"
|
assert_output --regexp 'cannot redeploy previous chaos version .*' + "${headHash:0:8}+U"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "deploy then force commit deploy" {
|
@test "deploy then force commit deploy" {
|
||||||
|
@ -181,7 +181,7 @@ teardown(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
@test "rollback chaos deployment is not possible" {
|
@test "rollback chaos deployment is possible" {
|
||||||
tagHash=$(_get_tag_hash "0.2.0+1.21.0")
|
tagHash=$(_get_tag_hash "0.2.0+1.21.0")
|
||||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout "$tagHash"
|
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout "$tagHash"
|
||||||
assert_success
|
assert_success
|
||||||
@ -191,12 +191,13 @@ teardown(){
|
|||||||
assert_output --partial "${tagHash:0:8}"
|
assert_output --partial "${tagHash:0:8}"
|
||||||
|
|
||||||
run $ABRA app rollback "$TEST_APP_DOMAIN" "0.1.1+1.20.2" --no-input --no-converge-checks
|
run $ABRA app rollback "$TEST_APP_DOMAIN" "0.1.1+1.20.2" --no-input --no-converge-checks
|
||||||
assert_failure
|
assert_success
|
||||||
assert_output --partial 'current deployment' + "${tagHash:0:8}" + 'is not a known version'
|
assert_output --regexp "CURRENT DEPLOYMENT.*${tagHash:0:8}"
|
||||||
|
assert_output --regexp "ENV VERSION.*${tagHash:0:8}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
@test "chaos commit rollback not possible" {
|
@test "specific chaos commit rollback not possible" {
|
||||||
_deploy_app
|
_deploy_app
|
||||||
|
|
||||||
tagHash=$(_get_tag_hash "0.2.0+1.21.0")
|
tagHash=$(_get_tag_hash "0.2.0+1.21.0")
|
||||||
|
@ -106,6 +106,7 @@ teardown(){
|
|||||||
|
|
||||||
run $ABRA app undeploy "$TEST_APP_DOMAIN" --no-input
|
run $ABRA app undeploy "$TEST_APP_DOMAIN" --no-input
|
||||||
assert_success
|
assert_success
|
||||||
|
assert_output --regexp "CURRENT DEPLOYMENT.*${_get_head_hash:0:8}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
|
@ -256,7 +256,7 @@ teardown(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
@test "upgrade commit deployment not possible" {
|
@test "commit deploy upgrade is possible" {
|
||||||
tagHash=$(_get_tag_hash "0.1.0+1.20.0")
|
tagHash=$(_get_tag_hash "0.1.0+1.20.0")
|
||||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout "$tagHash"
|
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" checkout "$tagHash"
|
||||||
assert_success
|
assert_success
|
||||||
@ -266,11 +266,12 @@ teardown(){
|
|||||||
assert_output --partial "${tagHash:0:8}"
|
assert_output --partial "${tagHash:0:8}"
|
||||||
|
|
||||||
run $ABRA app upgrade "$TEST_APP_DOMAIN" "0.1.1+1.20.2" --no-input --no-converge-checks
|
run $ABRA app upgrade "$TEST_APP_DOMAIN" "0.1.1+1.20.2" --no-input --no-converge-checks
|
||||||
assert_failure
|
assert_success
|
||||||
assert_output --partial "not a known version"
|
assert_output --regexp "CURRENT DEPLOYMENT.*${tagHash:0:8}"
|
||||||
|
assert_output --regexp "ENV VERSION.*${tagHash:0:8}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "chaos commit upgrade not possible" {
|
@test "chaos commit upgrade is possible" {
|
||||||
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --no-input --no-converge-checks
|
run $ABRA app deploy "$TEST_APP_DOMAIN" "0.1.0+1.20.0" --no-input --no-converge-checks
|
||||||
assert_success
|
assert_success
|
||||||
assert_output --partial '0.1.0+1.20.0'
|
assert_output --partial '0.1.0+1.20.0'
|
||||||
@ -278,8 +279,7 @@ teardown(){
|
|||||||
tagHash=$(_get_tag_hash "0.2.0+1.21.0")
|
tagHash=$(_get_tag_hash "0.2.0+1.21.0")
|
||||||
|
|
||||||
run $ABRA app upgrade "$TEST_APP_DOMAIN" "$tagHash" --no-input --no-converge-checks
|
run $ABRA app upgrade "$TEST_APP_DOMAIN" "$tagHash" --no-input --no-converge-checks
|
||||||
assert_failure
|
assert_success
|
||||||
assert_output --partial "not a known version"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# bats test_tags=slow
|
# bats test_tags=slow
|
||||||
|
Reference in New Issue
Block a user