forked from toolshed/abra
Add test to make sure non-chaos hash deploy fails..
..and make sure _ensure_env_version passes through variable correctly.
This commit is contained in:
@ -174,6 +174,23 @@ teardown(){
|
||||
assert_output --partial "${wantHash:0:8}"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "bail if env has a hash but no --chaos" {
|
||||
wantHash=$(_get_n_hash 3)
|
||||
|
||||
run git -C "$ABRA_DIR/recipes/$TEST_RECIPE" reset --hard HEAD~3
|
||||
assert_success
|
||||
|
||||
assert_equal $(_get_current_hash) "$wantHash"
|
||||
|
||||
_ensure_env_version "$wantHash"
|
||||
|
||||
run $ABRA app deploy "$TEST_APP_DOMAIN" \
|
||||
--no-input --no-converge-checks
|
||||
assert_failure
|
||||
assert_output --partial "chaos commit"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "retrieve recipe if missing" {
|
||||
run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE"
|
||||
|
Reference in New Issue
Block a user