Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
bbf393dd95
|
@ -38,6 +38,10 @@ Passing "--prune/-p" does not remove those volumes.`,
|
||||
app := internal.ValidateApp(args)
|
||||
stackName := app.StackName()
|
||||
|
||||
if err := app.Recipe.Ensure(internal.GetEnsureContext()); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
cl, err := client.New(app.Server)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
@ -8,10 +8,6 @@ setup_file(){
|
||||
}
|
||||
|
||||
teardown_file(){
|
||||
if [[ ! -f "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" ]]; then
|
||||
_new_app
|
||||
fi
|
||||
|
||||
_undeploy_app
|
||||
_rm_app
|
||||
_rm_server
|
||||
@ -23,10 +19,6 @@ setup(){
|
||||
}
|
||||
|
||||
teardown(){
|
||||
if [[ ! -f "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env" ]]; then
|
||||
_new_app
|
||||
fi
|
||||
|
||||
_reset_recipe
|
||||
_undeploy_app
|
||||
}
|
||||
@ -145,21 +137,3 @@ teardown(){
|
||||
assert_success
|
||||
assert_not_exists "$ABRA_DIR/servers/foo.com"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "list does not fail if missing .env" {
|
||||
_deploy_app
|
||||
|
||||
run $ABRA app ls --status
|
||||
assert_success
|
||||
|
||||
run rm -rf "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||
assert_success
|
||||
assert_not_exists "$ABRA_DIR/servers/$TEST_SERVER/$TEST_APP_DOMAIN.env"
|
||||
|
||||
output=$("$ABRA" app ls --server "$TEST_SERVER" --status --machine)
|
||||
run diff \
|
||||
<(jq -S "." <(echo "$output")) \
|
||||
<(jq -S "." <(echo '{}'))
|
||||
assert_success
|
||||
}
|
||||
|
@ -30,6 +30,20 @@ teardown(){
|
||||
assert_failure
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "retrieve recipe if missing" {
|
||||
_deploy_app
|
||||
|
||||
run rm -rf "$ABRA_DIR/recipes/$TEST_RECIPE"
|
||||
assert_success
|
||||
assert_not_exists "$ABRA_DIR/recipes/$TEST_RECIPE"
|
||||
|
||||
run $ABRA app undeploy "$TEST_APP_DOMAIN" --no-input
|
||||
assert_success
|
||||
|
||||
assert_exists "$ABRA_DIR/recipes/$TEST_RECIPE"
|
||||
}
|
||||
|
||||
# bats test_tags=slow
|
||||
@test "ensure recipe up to date if no --offline" {
|
||||
_deploy_app
|
||||
|
Reference in New Issue
Block a user