Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: nolouch <nolouch@gmail.com>
  • Loading branch information
nolouch committed Apr 10, 2024
1 parent 2fa25bc commit 81a3525
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client/resource_group/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func loadServerConfig(ctx context.Context, provider ResourceGroupProvider) (*Con
log.Warn("[resource group controller] server does not save config, load config failed")
return DefaultConfig(), nil
}
config := &Config{}
config := DefaultConfig()
err = json.Unmarshal(kvs[0].GetValue(), config)
if err != nil {
return nil, err
Expand Down Expand Up @@ -379,7 +379,7 @@ func (c *ResourceGroupsController) Start(ctx context.Context) {
}
for _, item := range resp {
cfgRevision = item.Kv.ModRevision
config := &Config{}
config := DefaultConfig()
if err := json.Unmarshal(item.Kv.Value, config); err != nil {
continue
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1446,8 +1446,6 @@ func (suite *resourceManagerClientTestSuite) TestResourceGroupControllerConfigCh
}
expectRUCfg := controller.GenerateRUConfig(defaultCfg)
expectRUCfg.DegradedModeWaitDuration = time.Second
expectRUCfg.WaitRetryInterval = 0 // server does not have it
expectRUCfg.WaitRetryTimes = 0 // server does not have it
// initial config verification
respString := sendRequest("GET", getAddr()+configURL, nil)
expectStr, err := json.Marshal(expectCfg)
Expand Down

0 comments on commit 81a3525

Please sign in to comment.