From 67962ad52742af41c2db3a8a69a7f84e6b52cf17 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Wed, 19 Nov 2025 23:07:40 -0500 Subject: [PATCH] tests: move helper to client.bats --- tests/unit/client.bats | 13 +++++++++++++ tests/unit/test_helper.bash | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/unit/client.bats b/tests/unit/client.bats index 7cb3fe177..38edf49c7 100644 --- a/tests/unit/client.bats +++ b/tests/unit/client.bats @@ -400,3 +400,16 @@ teardown() { assert_success assert_output_contains "triggered smoke-test-plugin:args with args: smoke-test-plugin:args, bash, -c, echo Hello" } + +setup_client_repo() { + declare TMP=${1:=$(mktemp -d "/tmp/${DOKKU_DOMAIN}.XXXXX")} + rmdir "$TMP" && cp -r "${BATS_TEST_DIRNAME}/../../tests/apps/nodejs-express" "$TMP" + cd "$TMP" || exit 1 + git init + git config user.email "robot@example.com" + git config user.name "Test Robot" + + [[ -f gitignore ]] && mv gitignore .gitignore + git add . + git commit -m 'initial commit' +} diff --git a/tests/unit/test_helper.bash b/tests/unit/test_helper.bash index 93be07b18..3af2d7391 100644 --- a/tests/unit/test_helper.bash +++ b/tests/unit/test_helper.bash @@ -374,19 +374,6 @@ deploy_app() { git push target "master:${GIT_REMOTE_BRANCH}" || destroy_app $? } -setup_client_repo() { - declare TMP=${1:=$(mktemp -d "/tmp/${DOKKU_DOMAIN}.XXXXX")} - rmdir "$TMP" && cp -r "${BATS_TEST_DIRNAME}/../../tests/apps/nodejs-express" "$TMP" - cd "$TMP" || exit 1 - git init - git config user.email "robot@example.com" - git config user.name "Test Robot" - - [[ -f gitignore ]] && mv gitignore .gitignore - git add . - git commit -m 'initial commit' -} - setup_test_tls() { local TLS_TYPE="$1" local TLS="/home/dokku/$TEST_APP/tls"