pulumi/pkg/testing
Thomas Kappler 14fd3155ce
Honor opts.PreviewCommandlineFlags in preview after refresh (#18063)
`ProgramTestOptions` has this option:
```go
	// PreviewCommandlineFlags specifies flags to add to the `pulumi preview` command line (e.g. "--color=raw")
	PreviewCommandlineFlags []string
```

However, ProgramTest runs `preview` twice, once before create and then
after refresh. The second run ignores `PreviewCommandlineFlags` which I
assume was an oversight. This PR fixes that.

The concrete use case is that I was working on a test where the second
preview run failed but it didn't tell me why; just "_no changes were
expected but changes were proposed_". With this PR I was able to add
`UpdateCommandlineFlags: []string{"--diff"}` to my test and saw the
property that changed unexpectedly.
2024-12-17 19:04:27 +00:00
..
integration Honor opts.PreviewCommandlineFlags in preview after refresh (#18063) 2024-12-17 19:04:27 +00:00