forked from toolshed/abra
test: recipe test fixups
This commit is contained in:
parent
b82ac3bd63
commit
7f910b4e5b
@ -16,6 +16,14 @@ setup(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
teardown(){
|
teardown(){
|
||||||
|
if [[ -f "$ABRA_DIR/servers/$TEST_SERVER/foobar.$TEST_SERVER.env" ]]; then
|
||||||
|
run $ABRA app undeploy "foobar.$TEST_SERVER" --no-input
|
||||||
|
assert_success
|
||||||
|
|
||||||
|
run $ABRA app rm "foobar.$TEST_SERVER" --no-input
|
||||||
|
assert_success
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -d "$ABRA_DIR/recipes/foobar" ]]; then
|
if [[ -d "$ABRA_DIR/recipes/foobar" ]]; then
|
||||||
run rm -rf "$ABRA_DIR/recipes/foobar"
|
run rm -rf "$ABRA_DIR/recipes/foobar"
|
||||||
assert_success
|
assert_success
|
||||||
@ -25,26 +33,32 @@ teardown(){
|
|||||||
@test "create new recipe" {
|
@test "create new recipe" {
|
||||||
run $ABRA recipe new foobar
|
run $ABRA recipe new foobar
|
||||||
assert_success
|
assert_success
|
||||||
assert_output --partial 'Your new foobar recipe has been created'
|
assert_output --partial "new recipe 'foobar' created"
|
||||||
assert_exists "$ABRA_DIR/recipes/foobar"
|
assert_exists "$ABRA_DIR/recipes/foobar"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# bats test_tags=slow
|
||||||
@test "create new app from new recipe" {
|
@test "create new app from new recipe" {
|
||||||
run $ABRA recipe new foobar
|
run $ABRA recipe new foobar
|
||||||
assert_success
|
assert_success
|
||||||
|
assert_exists "$ABRA_DIR/recipes/foobar"
|
||||||
|
|
||||||
run $ABRA app new foobar \
|
run $ABRA app new foobar \
|
||||||
--no-input \
|
--no-input \
|
||||||
--server "$TEST_SERVER" \
|
--server "$TEST_SERVER" \
|
||||||
--domain "foobar.$TEST_SERVER"
|
--domain "foobar.$TEST_SERVER"
|
||||||
assert_success
|
assert_success
|
||||||
assert_output --partial 'A new foobar app has been created!'
|
assert_output --partial "new app 'foobar' created"
|
||||||
|
|
||||||
|
run $ABRA app deploy "foobar.$TEST_SERVER" --no-input
|
||||||
|
assert_success
|
||||||
|
assert_output --partial 'using latest commit'
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "create new recipe with git credentials" {
|
@test "create new recipe with git credentials" {
|
||||||
run $ABRA recipe new foobar --git-name fooUser --git-email foo@example.com
|
run $ABRA recipe new foobar --git-name fooUser --git-email foo@example.com
|
||||||
assert_success
|
assert_success
|
||||||
assert_output --partial 'Your new foobar recipe has been created'
|
assert_output --partial "new recipe 'foobar' created"
|
||||||
assert_exists "$ABRA_DIR/recipes/foobar"
|
assert_exists "$ABRA_DIR/recipes/foobar"
|
||||||
|
|
||||||
run bash -c 'git -C "$ABRA_DIR/recipes/foobar" log -n 1'
|
run bash -c 'git -C "$ABRA_DIR/recipes/foobar" log -n 1'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user