57 lines
1.0 KiB
Bash
57 lines
1.0 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
setup_file(){
|
|
load "$PWD/tests/integration/helpers/common"
|
|
_common_setup
|
|
_add_server
|
|
_new_app
|
|
}
|
|
|
|
teardown_file(){
|
|
if [[ ! -f "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" ]]; then
|
|
_new_app
|
|
fi
|
|
|
|
_undeploy_app
|
|
_rm_app
|
|
_rm_server
|
|
_reset_recipe
|
|
|
|
if [[ -d "$ABRA_DIR/servers/foo" ]]; then
|
|
run rm -rf "$ABRA_DIR/servers/foo"
|
|
assert_success
|
|
assert_not_exists "$ABRA_DIR/servers/foo"
|
|
fi
|
|
}
|
|
|
|
setup(){
|
|
load "$PWD/tests/integration/helpers/common"
|
|
_common_setup
|
|
}
|
|
|
|
teardown(){
|
|
if [[ ! -f "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" ]]; then
|
|
_new_app
|
|
fi
|
|
|
|
_undeploy_app
|
|
_wipe_env_version
|
|
_reset_recipe
|
|
|
|
if [[ -d "$ABRA_DIR/servers/foo" ]]; then
|
|
run rm -rf "$ABRA_DIR/servers/foo"
|
|
assert_success
|
|
assert_not_exists "$ABRA_DIR/servers/foo"
|
|
fi
|
|
}
|
|
|
|
@test "output is machine readable" {
|
|
run $ABRA app ls --machine
|
|
|
|
expectedOutput='{"'
|
|
expectedOutput+="$TEST_SERVER"
|
|
expectedOutput+='":{"apps":'
|
|
|
|
assert_output --partial "$expectedOutput"
|
|
}
|