MCPcopy
hub / github.com/NVIDIA/aistore / TestConfigFailOverrideClusterOnly

Function TestConfigFailOverrideClusterOnly

ais/tests/config_test.go:163–184  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

161}
162
163func TestConfigFailOverrideClusterOnly(t *testing.T) {
164 var (
165 proxyURL = tutils.GetPrimaryURL()
166 baseParams = tutils.BaseAPIParams(proxyURL)
167 smap = tutils.GetClusterMap(t, proxyURL)
168 config = tutils.GetClusterConfig(t)
169 )
170 proxy, err := smap.GetRandProxy(false /*exclude primary*/)
171 tassert.CheckFatal(t, err)
172
173 // Try overriding cluster only config on a daemon
174 err = api.SetDaemonConfig(baseParams, proxy.ID(), cos.SimpleKVs{"ec.enabled": strconv.FormatBool(!config.EC.Enabled)})
175 tassert.Fatalf(t, err != nil, "expected error to occur when trying to override cluster only config")
176
177 daemonConfig := tutils.GetDaemonConfig(t, proxy)
178 tassert.Errorf(t, daemonConfig.EC.Enabled == config.EC.Enabled,
179 "expected 'ec.enabled' to be %v, got: %v", config.EC.Enabled, daemonConfig.EC.Enabled)
180
181 // wait for ec
182 flt := api.XactReqArgs{Kind: apc.ActECEncode}
183 _, _ = api.WaitForXactionIC(baseParams, flt)
184}
185
186func TestConfigOverrideAndRestart(t *testing.T) {
187 tutils.CheckSkip(t, tutils.SkipTestArgs{RequiredDeployment: tutils.ClusterTypeLocal, MinProxies: 2})

Callers

nothing calls this directly

Calls 12

GetPrimaryURLFunction · 0.92
BaseAPIParamsFunction · 0.92
GetClusterMapFunction · 0.92
GetClusterConfigFunction · 0.92
CheckFatalFunction · 0.92
SetDaemonConfigFunction · 0.92
FatalfFunction · 0.92
GetDaemonConfigFunction · 0.92
ErrorfFunction · 0.92
WaitForXactionICFunction · 0.92
GetRandProxyMethod · 0.80
IDMethod · 0.65

Tested by

no test coverage detected