From 38a9f0dfdc5b7970d73f81551f3223a7c5718b5d Mon Sep 17 00:00:00 2001 From: Koen Rouwhorst Date: Sat, 12 Oct 2019 17:53:57 +0200 Subject: [PATCH] Update tests --- test/entrypoint.bats | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/entrypoint.bats b/test/entrypoint.bats index b2c4ced..3f2b315 100644 --- a/test/entrypoint.bats +++ b/test/entrypoint.bats @@ -43,30 +43,30 @@ function assert_key_not_exists { # Cloudflare @test "Cloudflare API user and key are set in credentials file" { - export CLOUDFLARE_API_USER="info@example.com" - export CLOUDFLARE_API_KEY="foo" + export INPUT_CLOUDFLAREAPIUSER="info@example.com" + export INPUT_CLOUDFLAREAPIKEY="foo" run "$WORKSPACE/entrypoint.sh" - assert_key_equals ".cloudflare.apiuser" "\$CLOUDFLARE_API_USER" - assert_key_equals ".cloudflare.apikey" "\$CLOUDFLARE_API_KEY" + assert_key_equals ".cloudflare.apiuser" "\$INPUT_CLOUDFLAREAPIUSER" + assert_key_equals ".cloudflare.apikey" "\$INPUT_CLOUDFLAREAPIKEY" assert_key_not_exists ".cloudflare.accountid" assert_key_not_exists ".cloudflare.accountname" } @test "Cloudflare API user and key, and optional account ID and name are set" { - export CLOUDFLARE_API_USER="info@example.com" - export CLOUDFLARE_API_KEY="foo" - export CLOUDFLARE_ACCOUNT_ID="1" - export CLOUDFLARE_ACCOUNT_NAME="Contoso" + export INPUT_CLOUDFLAREAPIUSER="info@example.com" + export INPUT_CLOUDFLAREAPIKEY="foo" + export INPUT_CLOUDFLAREACCOUNTID="1" + export INPUT_CLOUDFLAREACCOUNTNAME="Contoso" run "$WORKSPACE/entrypoint.sh" - assert_key_equals ".cloudflare.apiuser" "\$CLOUDFLARE_API_USER" - assert_key_equals ".cloudflare.apikey" "\$CLOUDFLARE_API_KEY" - assert_key_equals ".cloudflare.accountid" "\$CLOUDFLARE_ACCOUNT_ID" - assert_key_equals ".cloudflare.accountname" "\$CLOUDFLARE_ACCOUNT_NAME" + assert_key_equals ".cloudflare.apiuser" "\$INPUT_CLOUDFLAREAPIUSER" + assert_key_equals ".cloudflare.apikey" "\$INPUT_CLOUDFLAREAPIKEY" + assert_key_equals ".cloudflare.accountid" "\$INPUT_CLOUDFLAREACCOUNTID" + assert_key_equals ".cloudflare.accountname" "\$INPUT_CLOUDFLAREACCOUNTNAME" } # DigitalOcean