From 482b680e16de3f471647efa7465289019ce81762 Mon Sep 17 00:00:00 2001 From: Michael Hobbs Date: Wed, 25 Feb 2015 19:47:45 -0800 Subject: [PATCH] [client unit-test] don't run create/destroy twice. actually clean up from create --- tests/unit/client.bats | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/tests/unit/client.bats b/tests/unit/client.bats index 67bb14cb532..88a6b0a6ef0 100644 --- a/tests/unit/client.bats +++ b/tests/unit/client.bats @@ -27,20 +27,16 @@ teardown() { assert_success } -@test "dokku client (apps:create)" { - destroy_app - run ./contrib/dokku_client.sh apps:create $TEST_APP +@test "dokku client (apps:create AND apps:destroy)" { + setup_client_repo + run bash -c "${BATS_TEST_DIRNAME}/../../contrib/dokku_client.sh apps:create" echo "output: "$output echo "status: "$status assert_success -} - -@test "dokku client (apps:destroy)" { - run ./contrib/dokku_client.sh -- --force apps:destroy $TEST_APP + run bash -c "${BATS_TEST_DIRNAME}/../../contrib/dokku_client.sh --force apps:destroy" echo "output: "$output echo "status: "$status assert_success - create_app # prevent teardown() failure } @test "dokku client (config:set)" { @@ -164,15 +160,3 @@ teardown() { echo "status: "$status assert_success } - -@test "dokku client (apps:create AND apps:destroy)" { - setup_client_repo - run bash -c "${BATS_TEST_DIRNAME}/../../contrib/dokku_client.sh apps:create" - echo "output: "$output - echo "status: "$status - assert_success - run bash -c "echo ${BATS_TEST_DIRNAME}/../../contrib/dokku_client.sh --force apps:destroy" - echo "output: "$output - echo "status: "$status - assert_success -}