core/controlplane: apply configuration changes in a background thread

This commit is contained in:
Caleb Doxsey 2023-10-30 13:27:09 -06:00
parent 2472490075
commit a45f07762b
4 changed files with 54 additions and 38 deletions

View file

@ -75,16 +75,15 @@ func TestEvents(t *testing.T) {
srv := &Server{
haveSetCapacity: make(map[string]bool),
currentConfig: atomicutil.NewValue(versionedConfig{
Config: &config.Config{
OutboundPort: outboundPort,
Options: &config.Options{
SharedKey: cryptutil.NewBase64Key(),
DataBrokerURLString: "http://" + li.Addr().String(),
GRPCInsecure: proto.Bool(true),
},
currentConfig: atomicutil.NewValue(&config.Config{
OutboundPort: outboundPort,
Options: &config.Options{
SharedKey: cryptutil.NewBase64Key(),
DataBrokerURLString: "http://" + li.Addr().String(),
GRPCInsecure: proto.Bool(true),
},
}),
},
),
}
err := srv.storeEvent(ctx, new(events.LastError))
assert.NoError(t, err)