-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for custom domains with self-managed certificates
- Loading branch information
Showing
9 changed files
with
207 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...ustom_domain_verification/with_self_managed_certs/custom_domain_pending_verification.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"custom_domain_id": "cd_selfmanaged", | ||
"domain": "terraform-provider.auth0.com", | ||
"primary": true, | ||
"status": "pending_verification", | ||
"type": "self_managed_certs", | ||
"verification": { | ||
"methods": [ | ||
{ | ||
"name": "txt", | ||
"record": "a6124756-554d-4a4b-b140-787bdea2e89c", | ||
"domain": "_cf-custom-hostname.terraform-provider.auth0.com" | ||
} | ||
] | ||
}, | ||
"tls_policy": "recommended" | ||
} |
18 changes: 18 additions & 0 deletions
18
...emock/__files/custom_domain_verification/with_self_managed_certs/custom_domain_ready.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"custom_domain_id": "cd_selfmanaged", | ||
"domain": "terraform-provider.auth0.com", | ||
"primary": true, | ||
"status": "ready", | ||
"type": "self_managed_certs", | ||
"origin_domain_name": "terraform-provider-cd-selfmanaged.edge.tenants.eu.auth0.com", | ||
"verification": { | ||
"methods": [ | ||
{ | ||
"name": "txt", | ||
"record": "a6124756-554d-4a4b-b140-787bdea2e89c", | ||
"domain": "_cf-custom-hostname.terraform-provider.auth0.com" | ||
} | ||
] | ||
}, | ||
"tls_policy": "recommended" | ||
} |
19 changes: 19 additions & 0 deletions
19
...mock/__files/custom_domain_verification/with_self_managed_certs/custom_domain_verify.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"custom_domain_id": "cd_selfmanaged", | ||
"domain": "terraform-provider.auth0.com", | ||
"primary": true, | ||
"status": "ready", | ||
"type": "self_managed_certs", | ||
"origin_domain_name": "terraform-provider-cd-selfmanaged.edge.tenants.eu.auth0.com", | ||
"cname_api_key": "ee26b0dd4af7e749aa1a8ee3c10ae9923f618980772e473f8819a5d4940e0db27ac185f8a0e1d5f84f88bc887fd67b143732c304cc5fa9ad8e6f57f50028a8ff", | ||
"verification": { | ||
"methods": [ | ||
{ | ||
"name": "txt", | ||
"record": "a6124756-554d-4a4b-b140-787bdea2e89c", | ||
"domain": "_cf-custom-hostname.terraform-provider.auth0.com" | ||
} | ||
] | ||
}, | ||
"tls_policy": "recommended" | ||
} |
9 changes: 9 additions & 0 deletions
9
...mappings/custom_domain_verification/with_self_managed_certs/delete_custom_domain_204.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"request": { | ||
"method": "DELETE", | ||
"url": "/api/v2/custom-domains/cd_selfmanaged" | ||
}, | ||
"response": { | ||
"status": 204 | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...main_verification/with_self_managed_certs/get_custom_domain_pending_verification_200.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"scenarioName": "Custom domain verification with self-managed certificates", | ||
"requiredScenarioState": "Started", | ||
"request": { | ||
"method": "GET", | ||
"url": "/api/v2/custom-domains/cd_selfmanaged" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "custom_domain_verification/with_self_managed_certs/custom_domain_pending_verification.json", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...pings/custom_domain_verification/with_self_managed_certs/get_custom_domain_ready_200.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"scenarioName": "Custom domain verification with self-managed certificates", | ||
"requiredScenarioState": "Verified", | ||
"request": { | ||
"method": "GET", | ||
"url": "/api/v2/custom-domains/cd_selfmanaged" | ||
}, | ||
"response": { | ||
"status": 200, | ||
"bodyFileName": "custom_domain_verification/with_self_managed_certs/custom_domain_ready.json", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...k/mappings/custom_domain_verification/with_self_managed_certs/post_custom_domain_201.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"request": { | ||
"method": "POST", | ||
"url": "/api/v2/custom-domains", | ||
"bodyPatterns": [ | ||
{ | ||
"equalToJson": { | ||
"domain": "terraform-provider.auth0.com", | ||
"type": "self_managed_certs" | ||
} | ||
} | ||
] | ||
}, | ||
"response": { | ||
"status": 201, | ||
"bodyFileName": "custom_domain_verification/with_self_managed_certs/custom_domain_pending_verification.json", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...ngs/custom_domain_verification/with_self_managed_certs/post_custom_domain_verify_200.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"scenarioName": "Custom domain verification with self-managed certificates", | ||
"requiredScenarioState": "Started", | ||
"newScenarioState": "Verified", | ||
"request": { | ||
"method": "POST", | ||
"url": "/api/v2/custom-domains/cd_selfmanaged/verify" | ||
}, | ||
"response": { | ||
"status": 201, | ||
"bodyFileName": "custom_domain_verification/with_self_managed_certs/custom_domain_verify.json", | ||
"headers": { | ||
"Content-Type": "application/json" | ||
} | ||
} | ||
} |