Skip to content

Commit

Permalink
Fix Integration Testcases (#1052)
Browse files Browse the repository at this point in the history
* Fix Integration Testcases

* Fix Integration Testcases.

* Fix Integration Testcases
  • Loading branch information
developerkunal authored Aug 8, 2024
1 parent e1f299e commit f5c05e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
24 changes: 12 additions & 12 deletions test/integration/custom-domains-test-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,29 @@ tests:
exactly: "[]"

003 - create domain with minimal flags:
command: auth0 domains create --domain "custom-domain.com" --no-input
command: auth0 domains create --domain "custom-domains.com" --no-input
exit-code: 0
stdout:
contains:
- "ID cd_"
- "DOMAIN 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 "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 \"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
exit-code: 0
stdout:
contains:
- "ID cd_"
- "DOMAIN custom-domain.com"
- "DOMAIN custom-domains.com"
- "STATUS pending_verification"
- "PROVISIONING TYPE auth0_managed_certs"

Expand All @@ -50,7 +50,7 @@ tests:
stdout:
contains:
- "ID cd_"
- "DOMAIN custom-domain.com"
- "DOMAIN custom-domains.com"
- "STATUS pending_verification"
- "PROVISIONING TYPE auth0_managed_certs"

Expand All @@ -60,7 +60,7 @@ tests:
stdout:
contains:
- "ID cd_"
- "DOMAIN custom-domain.com"
- "DOMAIN custom-domains.com"
- "STATUS pending_verification"
- "PROVISIONING TYPE auth0_managed_certs"
- "TLS POLICY recommended"
Expand All @@ -71,7 +71,7 @@ tests:
stdout:
contains:
- "ID cd_"
- "DOMAIN custom-domain.com"
- "DOMAIN custom-domains.com"
- "PROVISIONING TYPE auth0_managed_certs"
- "TLS POLICY recommended"

Expand All @@ -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 "custom-domains.com" --verification txt --type self --policy recommended --no-input
exit-code: 0
stdout:
contains:
- "ID cd_"
- "DOMAIN custom-domain.com"
- "DOMAIN custom-domains.com"
- "STATUS pending_verification"
- "PROVISIONING TYPE self_managed_certs"
- "VERIFICATION METHOD txt"
Expand All @@ -97,6 +97,6 @@ tests:
exit-code: 0
stdout:
contains:
- "ID DOMAIN STATUS"
- "ID DOMAIN STATUS"
- "cd_"
- "custom-domain.com"
- "custom-domains.com"
4 changes: 2 additions & 2 deletions test/integration/scripts/get-custom-domain-id.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash

testing_domain_name="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
Expand All @@ -17,4 +17,4 @@ for domain in $( printf "%s" "$domains" | jq -r '.[] | @base64' ); do
exit 0
fi
exit 1
done
done

0 comments on commit f5c05e5

Please sign in to comment.