@@ -48,7 +48,7 @@ func TestAccEC2StopInstanceAction_force(t *testing.T) {
4848 }
4949
5050 // Invoke the action programmatically with force=true
51- if err := invokeStopInstanceAction (t , ctx , * v .InstanceId , true ); err != nil {
51+ if err := invokeStopInstanceAction (ctx , t , * v .InstanceId , true ); err != nil {
5252 t .Fatalf ("Failed to invoke stop instance action: %v" , err )
5353 }
5454 },
@@ -138,7 +138,7 @@ action "aws_ec2_stop_instance" "test" {
138138}
139139
140140// Step 1: Get the AWS provider as a ProviderServerWithActions
141- func providerWithActions (t * testing. T , ctx context. Context ) tfprotov5.ProviderServerWithActions {
141+ func providerWithActions (ctx context. Context , t * testing. T ) tfprotov5.ProviderServerWithActions {
142142 t .Helper ()
143143
144144 // Use the existing configured provider factories that handle muxing
@@ -157,7 +157,7 @@ func providerWithActions(t *testing.T, ctx context.Context) tfprotov5.ProviderSe
157157 }
158158
159159 // Cast to ProviderServerWithActions
160- providerWithActions , ok := providerServer .(tfprotov5.ProviderServerWithActions )
160+ providerWithActions , ok := providerServer .(tfprotov5.ProviderServerWithActions ) //nolint:staticcheck // SA1019: Working in alpha situation
161161 if ! ok {
162162 t .Fatal ("Provider does not implement ProviderServerWithActions" )
163163 }
@@ -256,11 +256,11 @@ func buildStopInstanceActionConfig(instanceID string, force bool) (tftypes.Type,
256256}
257257
258258// Step 3: Programmatic action invocation
259- func invokeStopInstanceAction (t * testing. T , ctx context. Context , instanceID string , force bool ) error {
259+ func invokeStopInstanceAction (ctx context. Context , t * testing. T , instanceID string , force bool ) error {
260260 t .Helper ()
261261
262262 // Get the provider
263- awsProvider := providerWithActions (t , ctx )
263+ p := providerWithActions (ctx , t )
264264
265265 // Build configuration
266266 configType , configMap := buildStopInstanceActionConfig (instanceID , force )
@@ -277,7 +277,7 @@ func invokeStopInstanceAction(t *testing.T, ctx context.Context, instanceID stri
277277 }
278278
279279 // Step 3: Invoke the action directly (provider should already be configured)
280- invokeResp , err := awsProvider .InvokeAction (ctx , & tfprotov5.InvokeActionRequest {
280+ invokeResp , err := p .InvokeAction (ctx , & tfprotov5.InvokeActionRequest {
281281 ActionType : actionTypeName ,
282282 Config : & testConfig ,
283283 })
0 commit comments