@@ -12,7 +12,6 @@ import (
1212
1313 ign3types "github.com/coreos/ignition/v2/config/v3_4/types"
1414 configv1 "github.com/openshift/api/config/v1"
15- "github.com/openshift/library-go/pkg/cloudprovider"
1615 "github.com/openshift/library-go/pkg/operator/configobserver/featuregates"
1716 "k8s.io/client-go/kubernetes/scheme"
1817
@@ -85,7 +84,7 @@ func TestCloudProvider(t *testing.T) {
8584 },
8685 }
8786
88- got , err := renderTemplate (RenderConfig {& config .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , nil , nil }, name , dummyTemplate )
87+ got , err := renderTemplate (RenderConfig {& config .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , nil }, name , dummyTemplate )
8988 if err != nil {
9089 t .Fatalf ("expected nil error %v" , err )
9190 }
@@ -146,9 +145,7 @@ func TestCredentialProviderConfigFlag(t *testing.T) {
146145 },
147146 }
148147
149- fgAccess := featuregates .NewHardcodedFeatureGateAccess (nil , nil )
150-
151- got , err := renderTemplate (RenderConfig {& config .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , fgAccess , nil }, name , dummyTemplate )
148+ got , err := renderTemplate (RenderConfig {& config .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , nil }, name , dummyTemplate )
152149 if err != nil {
153150 t .Fatalf ("expected nil error %v" , err )
154151 }
@@ -240,18 +237,16 @@ func TestInvalidPlatform(t *testing.T) {
240237 }
241238 }
242239
243- fgAccess := featuregates .NewHardcodedFeatureGateAccess (nil , nil )
244-
245240 // we must treat unrecognized constants as "none"
246241 controllerConfig .Spec .Infra .Status .PlatformStatus .Type = "_bad_"
247- _ , err = generateTemplateMachineConfigs (& RenderConfig {& controllerConfig .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , fgAccess , nil }, templateDir )
242+ _ , err = generateTemplateMachineConfigs (& RenderConfig {& controllerConfig .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , nil }, templateDir )
248243 if err != nil {
249244 t .Errorf ("expect nil error, got: %v" , err )
250245 }
251246
252247 // explicitly blocked
253248 controllerConfig .Spec .Infra .Status .PlatformStatus .Type = "_base"
254- _ , err = generateTemplateMachineConfigs (& RenderConfig {& controllerConfig .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , fgAccess , nil }, templateDir )
249+ _ , err = generateTemplateMachineConfigs (& RenderConfig {& controllerConfig .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , nil }, templateDir )
255250 expectErr (err , "failed to create MachineConfig for role master: platform _base unsupported" )
256251}
257252
@@ -262,9 +257,7 @@ func TestGenerateMachineConfigs(t *testing.T) {
262257 t .Fatalf ("failed to get controllerconfig config: %v" , err )
263258 }
264259
265- fgAccess := featuregates .NewHardcodedFeatureGateAccess (nil , []configv1.FeatureGateName {cloudprovider .ExternalCloudProviderFeature , cloudprovider .ExternalCloudProviderFeatureAzure , cloudprovider .ExternalCloudProviderFeatureGCP , cloudprovider .ExternalCloudProviderFeatureExternal })
266-
267- cfgs , err := generateTemplateMachineConfigs (& RenderConfig {& controllerConfig .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , fgAccess , nil }, templateDir )
260+ cfgs , err := generateTemplateMachineConfigs (& RenderConfig {& controllerConfig .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , nil }, templateDir )
268261 if err != nil {
269262 t .Fatalf ("failed to generate machine configs: %v" , err )
270263 }
@@ -391,7 +384,7 @@ func TestGetPaths(t *testing.T) {
391384 }
392385 c .res = append (c .res , platformBase )
393386
394- got := getPaths (& RenderConfig {& config .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , nil , nil }, config .Spec .Platform )
387+ got := getPaths (& RenderConfig {& config .Spec , `{"dummy":"dummy"}` , `{"dummy":"dummy"}` , nil }, config .Spec .Platform )
395388 if reflect .DeepEqual (got , c .res ) {
396389 t .Fatalf ("mismatch got: %s want: %s" , got , c .res )
397390 }
0 commit comments