Skip to content

Commit eed92a9

Browse files
authored
[APIE-570] Support dr-test environment (#3227)
1 parent 88f1d6c commit eed92a9

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

pkg/auth/sso/auth0_utils.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ var auth0ClientIds = map[string]string{
1616
"prod": "oX2nvSKl5jvBKVgwehZfvR4K8RhsZIEs",
1717
"stag": "8RxQmZEYtEDah4MTIIzl4hGGeFwdJS6w",
1818
"test": "00000000000000000000000000000000",
19+
"dr-test": "5nyOPfaw4CDyMZFCu2AgtPVNKoO8kpKB",
1920
}
2021

2122
func GetAuth0CCloudClientIdFromBaseUrl(baseUrl string) string {
@@ -34,6 +35,8 @@ func GetCCloudEnvFromBaseUrl(baseUrl string) string {
3435
return "devel"
3536
} else if strings.Contains(u.Host, "stag") {
3637
return "stag"
38+
} else if strings.Contains(u.Host, "dr-test") {
39+
return "dr-test"
3740
}
3841
} else if strings.HasSuffix(u.Host, "confluentgov.com") {
3942
return "prod-us-gov"

pkg/auth/sso/auth0_utils_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func TestGetCCloudEnvFromBaseUrl(t *testing.T) {
2424
"https://east-1.devel.confluentgov-internal.com": "devel-us-gov",
2525
"https://infra.confluentgov-internal.com": "infra-us-gov",
2626
"https://stag.cpdev.cloud": "stag",
27+
"https://dr-test.cpdev.cloud": "dr-test",
2728
testserver.TestCloudUrl.String(): "test",
2829
} {
2930
actual := GetCCloudEnvFromBaseUrl(url)

pkg/ccloudv2/logging.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ func getLoggingUrl(baseURL string) (string, error) {
151151
u.Host = "api.logging.stag.cpdev.cloud"
152152
} else if strings.Contains(u.Host, "confluent.cloud") {
153153
u.Host = "api.logging.confluent.cloud"
154+
} else if strings.Contains(u.Host, "dr-test.cpdev.cloud") {
155+
u.Host = "api.logging.dr-test.cpdev.cloud"
154156
} else {
155157
u.Host = "api.logging." + strings.TrimPrefix(u.Host, "api.")
156158
}

pkg/ccloudv2/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func getServerUrl(baseURL string) string {
111111
return baseURL
112112
}
113113

114-
if slices.Contains([]string{"confluent.cloud", "devel.cpdev.cloud", "stag.cpdev.cloud"}, u.Host) {
114+
if slices.Contains([]string{"confluent.cloud", "devel.cpdev.cloud", "stag.cpdev.cloud", "dr-test.cpdev.cloud"}, u.Host) {
115115
u.Host = "api." + u.Host
116116
u.Path = ""
117117
} else {

0 commit comments

Comments
 (0)