2023-09-07 16:50:25 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
setup_file(){
|
|
|
|
load "$PWD/tests/integration/helpers/common"
|
|
|
|
_common_setup
|
|
|
|
_add_server
|
|
|
|
}
|
|
|
|
|
|
|
|
teardown_file(){
|
|
|
|
_rm_server
|
|
|
|
}
|
|
|
|
|
|
|
|
setup(){
|
|
|
|
load "$PWD/tests/integration/helpers/common"
|
|
|
|
_common_setup
|
|
|
|
}
|
|
|
|
|
|
|
|
teardown(){
|
|
|
|
if [[ -d "$ABRA_DIR/recipes/foobar" ]]; then
|
|
|
|
run rm -rf "$ABRA_DIR/recipes/foobar"
|
|
|
|
assert_success
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "create new recipe" {
|
2024-02-23 11:34:59 +00:00
|
|
|
run $ABRA recipe new foobar --git-user foo --git-email foo@example.com
|
2023-09-07 16:50:25 +00:00
|
|
|
assert_success
|
|
|
|
assert_output --partial 'Your new foobar recipe has been created'
|
|
|
|
assert_exists "$ABRA_DIR/recipes/foobar"
|
|
|
|
}
|
|
|
|
|
|
|
|
@test "create new app from new recipe" {
|
2024-02-23 11:34:59 +00:00
|
|
|
run $ABRA recipe new foobar --git-user foo --git-email foo@example.com
|
2023-09-07 16:50:25 +00:00
|
|
|
assert_success
|
|
|
|
|
|
|
|
run $ABRA app new foobar \
|
|
|
|
--no-input \
|
|
|
|
--server "$TEST_SERVER" \
|
|
|
|
--domain "foobar.$TEST_SERVER"
|
|
|
|
assert_success
|
|
|
|
assert_output --partial 'A new foobar app has been created!'
|
|
|
|
}
|