@@ -215,34 +215,34 @@ func TestValidateAdmissionPluginConfig(t *testing.T) {
215
215
bothEmpty := configapi.AdmissionPluginConfig {}
216
216
217
217
tests := []struct {
218
- config map [string ]configapi.AdmissionPluginConfig
218
+ config map [string ]* configapi.AdmissionPluginConfig
219
219
expectError bool
220
220
warningFields []string
221
221
}{
222
222
{
223
- config : map [string ]configapi.AdmissionPluginConfig {
224
- "one" : locationOnly ,
225
- "two" : configOnly ,
223
+ config : map [string ]* configapi.AdmissionPluginConfig {
224
+ "one" : & locationOnly ,
225
+ "two" : & configOnly ,
226
226
},
227
227
},
228
228
{
229
- config : map [string ]configapi.AdmissionPluginConfig {
230
- "one" : locationOnly ,
231
- "two" : locationAndConfig ,
229
+ config : map [string ]* configapi.AdmissionPluginConfig {
230
+ "one" : & locationOnly ,
231
+ "two" : & locationAndConfig ,
232
232
},
233
233
expectError : true ,
234
234
},
235
235
{
236
- config : map [string ]configapi.AdmissionPluginConfig {
237
- "one" : configOnly ,
238
- "two" : bothEmpty ,
236
+ config : map [string ]* configapi.AdmissionPluginConfig {
237
+ "one" : & configOnly ,
238
+ "two" : & bothEmpty ,
239
239
},
240
240
expectError : true ,
241
241
},
242
242
{
243
- config : map [string ]configapi.AdmissionPluginConfig {
244
- "openshift.io/OriginResourceQuota" : configOnly ,
245
- "two" : configOnly ,
243
+ config : map [string ]* configapi.AdmissionPluginConfig {
244
+ "openshift.io/OriginResourceQuota" : & configOnly ,
245
+ "two" : & configOnly ,
246
246
},
247
247
warningFields : []string {"[openshift.io/OriginResourceQuota]" },
248
248
expectError : false ,
@@ -325,7 +325,7 @@ func TestValidateAdmissionPluginConfigConflicts(t *testing.T) {
325
325
name : "specified, non-conflicting plugin configs 01" ,
326
326
options : configapi.MasterConfig {
327
327
AdmissionConfig : configapi.AdmissionConfig {
328
- PluginConfig : map [string ]configapi.AdmissionPluginConfig {
328
+ PluginConfig : map [string ]* configapi.AdmissionPluginConfig {
329
329
"foo" : {
330
330
Location : "bar" ,
331
331
},
@@ -338,7 +338,7 @@ func TestValidateAdmissionPluginConfigConflicts(t *testing.T) {
338
338
options : configapi.MasterConfig {
339
339
KubernetesMasterConfig : & configapi.KubernetesMasterConfig {
340
340
AdmissionConfig : configapi.AdmissionConfig {
341
- PluginConfig : map [string ]configapi.AdmissionPluginConfig {
341
+ PluginConfig : map [string ]* configapi.AdmissionPluginConfig {
342
342
"foo" : {
343
343
Location : "bar" ,
344
344
},
@@ -349,7 +349,7 @@ func TestValidateAdmissionPluginConfigConflicts(t *testing.T) {
349
349
},
350
350
},
351
351
AdmissionConfig : configapi.AdmissionConfig {
352
- PluginConfig : map [string ]configapi.AdmissionPluginConfig {
352
+ PluginConfig : map [string ]* configapi.AdmissionPluginConfig {
353
353
"foo" : {
354
354
Location : "bar" ,
355
355
},
@@ -362,7 +362,7 @@ func TestValidateAdmissionPluginConfigConflicts(t *testing.T) {
362
362
options : configapi.MasterConfig {
363
363
KubernetesMasterConfig : & configapi.KubernetesMasterConfig {
364
364
AdmissionConfig : configapi.AdmissionConfig {
365
- PluginConfig : map [string ]configapi.AdmissionPluginConfig {
365
+ PluginConfig : map [string ]* configapi.AdmissionPluginConfig {
366
366
"foo" : {
367
367
Location : "bar" ,
368
368
},
@@ -379,15 +379,15 @@ func TestValidateAdmissionPluginConfigConflicts(t *testing.T) {
379
379
options : configapi.MasterConfig {
380
380
KubernetesMasterConfig : & configapi.KubernetesMasterConfig {
381
381
AdmissionConfig : configapi.AdmissionConfig {
382
- PluginConfig : map [string ]configapi.AdmissionPluginConfig {
382
+ PluginConfig : map [string ]* configapi.AdmissionPluginConfig {
383
383
"foo" : {
384
384
Location : "different" ,
385
385
},
386
386
},
387
387
},
388
388
},
389
389
AdmissionConfig : configapi.AdmissionConfig {
390
- PluginConfig : map [string ]configapi.AdmissionPluginConfig {
390
+ PluginConfig : map [string ]* configapi.AdmissionPluginConfig {
391
391
"foo" : {
392
392
Location : "bar" ,
393
393
},
0 commit comments