Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Integration Testcases #1052

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading