From 65e82bcea17f682dcdfa88a7473d4ff43821c926 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Tue, 16 Apr 2019 21:24:56 -0400 Subject: [PATCH] fix: allow reporting domains when there are none specified This previously bailed if the response was empty, which in this case is incorrect, as the response isn't based on whether the app is deployed or not. --- plugins/domains/internal-functions | 1 - tests/unit/20_domains.bats | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/domains/internal-functions b/plugins/domains/internal-functions index f93d51429..74b1661e2 100755 --- a/plugins/domains/internal-functions +++ b/plugins/domains/internal-functions @@ -63,7 +63,6 @@ cmd-domains-report-single() { fi done [[ "$match" == "true" ]] || dokku_log_fail "Invalid flag passed, valid flags:${valid_flags}" - [[ "$value_exists" == "true" ]] || dokku_log_fail "not deployed" fi } diff --git a/tests/unit/20_domains.bats b/tests/unit/20_domains.bats index 8c05f8994..3f736890c 100644 --- a/tests/unit/20_domains.bats +++ b/tests/unit/20_domains.bats @@ -173,6 +173,11 @@ teardown() { echo "status: $status" assert_success + run /bin/bash -c "dokku domains:report $TEST_APP" + echo "output: $output" + echo "status: $status" + assert_success + run /bin/bash -c "dokku domains:clear $TEST_APP" echo "output: $output" echo "status: $status" @@ -183,6 +188,11 @@ teardown() { echo "status: $status" assert_success refute_line test.app.dokku.me + + run /bin/bash -c "dokku domains:report $TEST_APP" + echo "output: $output" + echo "status: $status" + assert_success } @test "(domains) domains:add-global" {