diff --git a/internal/terraform/context_plan_actions_test.go b/internal/terraform/context_plan_actions_test.go index 788e768e57..c9a893d5b7 100644 --- a/internal/terraform/context_plan_actions_test.go +++ b/internal/terraform/context_plan_actions_test.go @@ -729,10 +729,12 @@ resource "test_object" "a" { `, }, - planActionResponse: &providers.PlanActionResponse{ - Diagnostics: tfdiags.Diagnostics{ - tfdiags.Sourceless(tfdiags.Warning, "Warning during planning", "Test case simulates a warning while planning"), - }, + planActionFn: func(t *testing.T, par providers.PlanActionRequest) providers.PlanActionResponse { + return providers.PlanActionResponse{ + Diagnostics: tfdiags.Diagnostics{ + tfdiags.Sourceless(tfdiags.Warning, "Warning during planning", "Test case simulates a warning while planning"), + }, + } }, expectPlanActionCalled: true,