MM-43832: Fix flaky TestReadReplicaDisabledBasedOnLicense (#20483)
The config store was incorrectly initialized. Other than that, I don't think there is any "flakyness" in the test. https://mattermost.atlassian.net/browse/MM-43832 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
eb034fc981
Коммит
c7aa2fdbb5
@@ -60,7 +60,6 @@ func TestStartServerSuccess(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestReadReplicaDisabledBasedOnLicense(t *testing.T) {
|
func TestReadReplicaDisabledBasedOnLicense(t *testing.T) {
|
||||||
t.Skip("TODO: fix flaky test")
|
|
||||||
cfg := model.Config{}
|
cfg := model.Config{}
|
||||||
cfg.SetDefaults()
|
cfg.SetDefaults()
|
||||||
driverName := os.Getenv("MM_SQLSETTINGS_DRIVERNAME")
|
driverName := os.Getenv("MM_SQLSETTINGS_DRIVERNAME")
|
||||||
@@ -97,6 +96,7 @@ func TestReadReplicaDisabledBasedOnLicense(t *testing.T) {
|
|||||||
s, err := NewServer(func(server *Server) error {
|
s, err := NewServer(func(server *Server) error {
|
||||||
configStore := config.NewTestMemoryStore()
|
configStore := config.NewTestMemoryStore()
|
||||||
configStore.Set(&cfg)
|
configStore.Set(&cfg)
|
||||||
|
server.configStore = &configWrapper{srv: server, Store: configStore}
|
||||||
server.licenseValue.Store(model.NewTestLicense())
|
server.licenseValue.Store(model.NewTestLicense())
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user