From ede7bc652f6a084b1619536b45fa5cc9ead5503e Mon Sep 17 00:00:00 2001 From: Kunal Dawar Date: Wed, 7 Aug 2024 16:14:45 +0530 Subject: [PATCH 1/3] Fix Integration Testcases --- .../custom-domains-test-cases.yaml | 22 +++++++++---------- .../scripts/get-custom-domain-id.sh | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/test/integration/custom-domains-test-cases.yaml b/test/integration/custom-domains-test-cases.yaml index 42e48e88d..eea71faa8 100644 --- a/test/integration/custom-domains-test-cases.yaml +++ b/test/integration/custom-domains-test-cases.yaml @@ -18,21 +18,21 @@ tests: exactly: "[]" 003 - create domain with minimal flags: - command: auth0 domains create --domain "custom-domain.com" --no-input + command: auth0 domains create --domain "example-custom-domain.com" --no-input exit-code: 0 stdout: contains: - "ID cd_" - - "DOMAIN custom-domain.com" + - "DOMAIN example-custom-domain.com" - "STATUS pending_verification" - "PROVISIONING TYPE auth0_managed_certs" 004 - unsuccessfully create domain with same name: - command: auth0 domains create --domain "custom-domain.com" --no-input + command: auth0 domains create --domain "example-custom-domain.com" --no-input exit-code: 1 stderr: contains: - - "Failed to create custom domain \"custom-domain.com\": 409 Conflict: The specified custom domain already exists" + - "Failed to create custom domain \"example-custom-domain.com\": 409 Conflict: The specified custom domain already exists" 005 - show domain: command: auth0 domains show $(./test/integration/scripts/get-custom-domain-id.sh) --no-input @@ -40,7 +40,7 @@ tests: stdout: contains: - "ID cd_" - - "DOMAIN custom-domain.com" + - "DOMAIN example-custom-domain.com" - "STATUS pending_verification" - "PROVISIONING TYPE auth0_managed_certs" @@ -50,7 +50,7 @@ tests: stdout: contains: - "ID cd_" - - "DOMAIN custom-domain.com" + - "DOMAIN example-custom-domain.com" - "STATUS pending_verification" - "PROVISIONING TYPE auth0_managed_certs" @@ -60,7 +60,7 @@ tests: stdout: contains: - "ID cd_" - - "DOMAIN custom-domain.com" + - "DOMAIN example-custom-domain.com" - "STATUS pending_verification" - "PROVISIONING TYPE auth0_managed_certs" - "TLS POLICY recommended" @@ -71,7 +71,7 @@ tests: stdout: contains: - "ID cd_" - - "DOMAIN custom-domain.com" + - "DOMAIN example-custom-domain.com" - "PROVISIONING TYPE auth0_managed_certs" - "TLS POLICY recommended" @@ -80,12 +80,12 @@ tests: exit-code: 0 010 - create domain with maximal flags: - command: auth0 domains create --domain "custom-domain.com" --verification txt --type self --policy recommended --no-input + command: auth0 domains create --domain "example-custom-domain.com" --verification txt --type self --policy recommended --no-input exit-code: 0 stdout: contains: - "ID cd_" - - "DOMAIN custom-domain.com" + - "DOMAIN example-custom-domain.com" - "STATUS pending_verification" - "PROVISIONING TYPE self_managed_certs" - "VERIFICATION METHOD txt" @@ -99,4 +99,4 @@ tests: contains: - "ID DOMAIN STATUS" - "cd_" - - "custom-domain.com" + - "example-custom-domain.com" diff --git a/test/integration/scripts/get-custom-domain-id.sh b/test/integration/scripts/get-custom-domain-id.sh index 438d71763..d8a516b85 100755 --- a/test/integration/scripts/get-custom-domain-id.sh +++ b/test/integration/scripts/get-custom-domain-id.sh @@ -1,6 +1,6 @@ #! /bin/bash -testing_domain_name="custom-domain.com" +testing_domain_name="example-custom-domain.com" domains=$( auth0 domains list --json --no-input ) for domain in $( printf "%s" "$domains" | jq -r '.[] | @base64' ); do @@ -17,4 +17,4 @@ for domain in $( printf "%s" "$domains" | jq -r '.[] | @base64' ); do exit 0 fi exit 1 -done \ No newline at end of file +done From 9202d2a70d16c461409bf90e35421dc389634134 Mon Sep 17 00:00:00 2001 From: Kunal Dawar Date: Wed, 7 Aug 2024 16:22:25 +0530 Subject: [PATCH 2/3] Fix Integration Testcases. --- .../custom-domains-test-cases.yaml | 22 +++++++++---------- .../scripts/get-custom-domain-id.sh | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test/integration/custom-domains-test-cases.yaml b/test/integration/custom-domains-test-cases.yaml index eea71faa8..7908a31ec 100644 --- a/test/integration/custom-domains-test-cases.yaml +++ b/test/integration/custom-domains-test-cases.yaml @@ -18,21 +18,21 @@ tests: exactly: "[]" 003 - create domain with minimal flags: - command: auth0 domains create --domain "example-custom-domain.com" --no-input + command: auth0 domains create --domain "custom-domains.com" --no-input exit-code: 0 stdout: contains: - "ID cd_" - - "DOMAIN example-custom-domain.com" + - "DOMAIN custom-domains.com" - "STATUS pending_verification" - "PROVISIONING TYPE auth0_managed_certs" 004 - unsuccessfully create domain with same name: - command: auth0 domains create --domain "example-custom-domain.com" --no-input + command: auth0 domains create --domain "custom-domains.com" --no-input exit-code: 1 stderr: contains: - - "Failed to create custom domain \"example-custom-domain.com\": 409 Conflict: The specified custom domain already exists" + - "Failed to create custom domain \"custom-domains.com\": 409 Conflict: The specified custom domain already exists" 005 - show domain: command: auth0 domains show $(./test/integration/scripts/get-custom-domain-id.sh) --no-input @@ -40,7 +40,7 @@ tests: stdout: contains: - "ID cd_" - - "DOMAIN example-custom-domain.com" + - "DOMAIN custom-domains.com" - "STATUS pending_verification" - "PROVISIONING TYPE auth0_managed_certs" @@ -50,7 +50,7 @@ tests: stdout: contains: - "ID cd_" - - "DOMAIN example-custom-domain.com" + - "DOMAIN custom-domains.com" - "STATUS pending_verification" - "PROVISIONING TYPE auth0_managed_certs" @@ -60,7 +60,7 @@ tests: stdout: contains: - "ID cd_" - - "DOMAIN example-custom-domain.com" + - "DOMAIN custom-domains.com" - "STATUS pending_verification" - "PROVISIONING TYPE auth0_managed_certs" - "TLS POLICY recommended" @@ -71,7 +71,7 @@ tests: stdout: contains: - "ID cd_" - - "DOMAIN example-custom-domain.com" + - "DOMAIN custom-domains.com" - "PROVISIONING TYPE auth0_managed_certs" - "TLS POLICY recommended" @@ -80,12 +80,12 @@ tests: exit-code: 0 010 - create domain with maximal flags: - command: auth0 domains create --domain "example-custom-domain.com" --verification txt --type self --policy recommended --no-input + command: auth0 domains create --domain "custom-domains.com" --verification txt --type self --policy recommended --no-input exit-code: 0 stdout: contains: - "ID cd_" - - "DOMAIN example-custom-domain.com" + - "DOMAIN custom-domains.com" - "STATUS pending_verification" - "PROVISIONING TYPE self_managed_certs" - "VERIFICATION METHOD txt" @@ -99,4 +99,4 @@ tests: contains: - "ID DOMAIN STATUS" - "cd_" - - "example-custom-domain.com" + - "custom-domains.com" diff --git a/test/integration/scripts/get-custom-domain-id.sh b/test/integration/scripts/get-custom-domain-id.sh index d8a516b85..a1123370d 100755 --- a/test/integration/scripts/get-custom-domain-id.sh +++ b/test/integration/scripts/get-custom-domain-id.sh @@ -1,6 +1,6 @@ #! /bin/bash -testing_domain_name="example-custom-domain.com" +testing_domain_name="custom-domains.com" domains=$( auth0 domains list --json --no-input ) for domain in $( printf "%s" "$domains" | jq -r '.[] | @base64' ); do From 987eaadc74d950c5c80ac05bcb48e69be0048a14 Mon Sep 17 00:00:00 2001 From: Kunal Dawar Date: Wed, 7 Aug 2024 16:55:06 +0530 Subject: [PATCH 3/3] Fix Integration Testcases --- test/integration/custom-domains-test-cases.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/custom-domains-test-cases.yaml b/test/integration/custom-domains-test-cases.yaml index 7908a31ec..142c74742 100644 --- a/test/integration/custom-domains-test-cases.yaml +++ b/test/integration/custom-domains-test-cases.yaml @@ -97,6 +97,6 @@ tests: exit-code: 0 stdout: contains: - - "ID DOMAIN STATUS" + - "ID DOMAIN STATUS" - "cd_" - "custom-domains.com"