@@ -108,8 +108,13 @@ func testStepNewConfig(ctx context.Context, t testing.T, c TestCase, wd *plugint
108108 opts = append (opts , tfexec .Destroy (true ))
109109 }
110110
111- if c .AdditionalCLIOptions != nil && c .AdditionalCLIOptions .Plan .AllowDeferral {
112- opts = append (opts , tfexec .AllowDeferral (true ))
111+ if c .AdditionalCLIOptions != nil {
112+ if c .AdditionalCLIOptions .Plan .AllowDeferral {
113+ opts = append (opts , tfexec .AllowDeferral (true ))
114+ }
115+ if c .AdditionalCLIOptions .Plan .NoRefresh {
116+ opts = append (opts , tfexec .Refresh (false ))
117+ }
113118 }
114119
115120 return wd .CreatePlan (ctx , opts ... )
@@ -250,8 +255,13 @@ func testStepNewConfig(ctx context.Context, t testing.T, c TestCase, wd *plugint
250255 opts = append (opts , tfexec .Destroy (true ))
251256 }
252257
253- if c .AdditionalCLIOptions != nil && c .AdditionalCLIOptions .Plan .AllowDeferral {
254- opts = append (opts , tfexec .AllowDeferral (true ))
258+ if c .AdditionalCLIOptions != nil {
259+ if c .AdditionalCLIOptions .Plan .AllowDeferral {
260+ opts = append (opts , tfexec .AllowDeferral (true ))
261+ }
262+ if c .AdditionalCLIOptions .Plan .NoRefresh {
263+ opts = append (opts , tfexec .Refresh (false ))
264+ }
255265 }
256266
257267 return wd .CreatePlan (ctx , opts ... )
@@ -319,8 +329,13 @@ func testStepNewConfig(ctx context.Context, t testing.T, c TestCase, wd *plugint
319329 }
320330 }
321331
322- if c .AdditionalCLIOptions != nil && c .AdditionalCLIOptions .Plan .AllowDeferral {
323- opts = append (opts , tfexec .AllowDeferral (true ))
332+ if c .AdditionalCLIOptions != nil {
333+ if c .AdditionalCLIOptions .Plan .AllowDeferral {
334+ opts = append (opts , tfexec .AllowDeferral (true ))
335+ }
336+ if c .AdditionalCLIOptions .Plan .NoRefresh {
337+ opts = append (opts , tfexec .Refresh (false ))
338+ }
324339 }
325340
326341 return wd .CreatePlan (ctx , opts ... )
0 commit comments