Mm 52577 Tie use of Stripe (or its mock) to use of CWS (or its mock) (#23277)
* set config CWSMock value according to model.MockCWS
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9f1796f98b
Коммит
9ee3526ca1
@@ -93,6 +93,7 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
|
||||
props["EnableEmailInvitations"] = strconv.FormatBool(*c.ServiceSettings.EnableEmailInvitations)
|
||||
|
||||
props["CWSURL"] = *c.CloudSettings.CWSURL
|
||||
props["CWSMock"] = model.MockCWS
|
||||
|
||||
props["DisableRefetchingOnBrowserFocus"] = strconv.FormatBool(*c.ExperimentalSettings.DisableRefetchingOnBrowserFocus)
|
||||
|
||||
|
||||
@@ -2780,6 +2780,7 @@ func (s *JobSettings) SetDefaults() {
|
||||
type CloudSettings struct {
|
||||
CWSURL *string `access:"write_restrictable"`
|
||||
CWSAPIURL *string `access:"write_restrictable"`
|
||||
CWSMock *bool `access:"write_restrictable"`
|
||||
}
|
||||
|
||||
func (s *CloudSettings) SetDefaults() {
|
||||
@@ -2795,6 +2796,10 @@ func (s *CloudSettings) SetDefaults() {
|
||||
s.CWSAPIURL = NewString(CloudSettingsDefaultCwsAPIURLTest)
|
||||
}
|
||||
}
|
||||
if s.CWSMock == nil {
|
||||
isMockCws := MockCWS == "true"
|
||||
s.CWSMock = &isMockCws
|
||||
}
|
||||
}
|
||||
|
||||
type ProductSettings struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user