[CLD-7373] Always overwrite CloudSettings based on service environment when in production (#26581)
* Always overwrite CloudSettings based on service environment * Only override the CWSURL, leave CWSAPIURL * Update to allow tests to pass * Undo unintentional changes
Этот коммит содержится в:
@@ -3015,16 +3015,18 @@ type CloudSettings struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *CloudSettings) SetDefaults() {
|
func (s *CloudSettings) SetDefaults() {
|
||||||
if s.CWSURL == nil {
|
serviceEnvironment := GetServiceEnvironment()
|
||||||
switch GetServiceEnvironment() {
|
if s.CWSURL == nil || serviceEnvironment == ServiceEnvironmentProduction {
|
||||||
|
switch serviceEnvironment {
|
||||||
case ServiceEnvironmentProduction:
|
case ServiceEnvironmentProduction:
|
||||||
s.CWSURL = NewString(CloudSettingsDefaultCwsURL)
|
s.CWSURL = NewString(CloudSettingsDefaultCwsURL)
|
||||||
case ServiceEnvironmentTest, ServiceEnvironmentDev:
|
case ServiceEnvironmentTest, ServiceEnvironmentDev:
|
||||||
s.CWSURL = NewString(CloudSettingsDefaultCwsURLTest)
|
s.CWSURL = NewString(CloudSettingsDefaultCwsURLTest)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if s.CWSAPIURL == nil {
|
if s.CWSAPIURL == nil {
|
||||||
switch GetServiceEnvironment() {
|
switch serviceEnvironment {
|
||||||
case ServiceEnvironmentProduction:
|
case ServiceEnvironmentProduction:
|
||||||
s.CWSAPIURL = NewString(CloudSettingsDefaultCwsAPIURL)
|
s.CWSAPIURL = NewString(CloudSettingsDefaultCwsAPIURL)
|
||||||
case ServiceEnvironmentTest, ServiceEnvironmentDev:
|
case ServiceEnvironmentTest, ServiceEnvironmentDev:
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user