(t *testing.T)
| 161 | } |
| 162 | |
| 163 | func 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 | |
| 186 | func TestConfigOverrideAndRestart(t *testing.T) { |
| 187 | tutils.CheckSkip(t, tutils.SkipTestArgs{RequiredDeployment: tutils.ClusterTypeLocal, MinProxies: 2}) |
nothing calls this directly
no test coverage detected