From 0532cae66617574369bb3ba7a09457cdaf22d87f Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sat, 22 May 2021 19:28:06 -0400 Subject: [PATCH] fix: correct failing repo test The previous version grepped for the number 0, which is now output in the repo cache line count. We should check for the exact value instead. --- tests/unit/repo.bats | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/unit/repo.bats b/tests/unit/repo.bats index 960836908..abdc68213 100644 --- a/tests/unit/repo.bats +++ b/tests/unit/repo.bats @@ -40,18 +40,20 @@ teardown() { echo "status: $status" assert_success - run /bin/bash -c "find $DOKKU_ROOT/$TEST_APP/cache -type f | wc -l | grep 0" - echo "output: $output" + run /bin/bash -c "find $DOKKU_ROOT/$TEST_APP/cache -type f | wc -l" + echo "count: '$output'" echo "status: $status" - assert_failure + assert_not_output 0 + run /bin/bash -c "dokku repo:purge-cache $TEST_APP" echo "output: $output" echo "status: $status" assert_success - run /bin/bash -c "find $DOKKU_ROOT/$TEST_APP/cache -type f | wc -l | grep 0" - echo "output: $output" + + run /bin/bash -c "find $DOKKU_ROOT/$TEST_APP/cache -type f | wc -l" + echo "count: '$output'" echo "status: $status" - assert_success + assert_output 0 run destroy_app echo "output: $output"