forked from toolshed/abra
@ -68,3 +68,27 @@ teardown(){
|
||||
assert_output --partial 'fooUser'
|
||||
assert_output --partial 'foo@example.com'
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "recipe new, app new, no releases, latest commit" {
|
||||
recipeName="foobar"
|
||||
|
||||
run $ABRA recipe new "$recipeName"
|
||||
assert_success
|
||||
assert_exists "$ABRA_DIR/recipes/$recipeName"
|
||||
|
||||
currentHash=$(git -C "$ABRA_DIR/recipes/$recipeName" show -s --format="%H")
|
||||
domain="$recipeName.$TEST_APP_SERVER"
|
||||
|
||||
run $ABRA app new "$recipeName" \
|
||||
--no-input \
|
||||
--server "$TEST_SERVER" \
|
||||
--domain "$domain"
|
||||
assert_success
|
||||
assert_output --partial "version: ${currentHash:0:8}"
|
||||
assert_exists "$ABRA_DIR/servers/$TEST_SERVER/$domain.env"
|
||||
|
||||
run grep -q "TYPE=$recipeName:${currentHash:0:8}" \
|
||||
"$ABRA_DIR/servers/$TEST_SERVER/$domain.env"
|
||||
assert_success
|
||||
}
|
||||
|
Reference in New Issue
Block a user