Skip to content

Commit f0e45e3

Browse files
authored
acc: Generate out.test.toml before skipping the tests (#3400)
## Changes Generate out.test.toml before skipping the tests ## Why Allows to generate out.test.toml for all settings locally, including Cloud = true ## Tests <!-- How have you tested the changes? --> <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
1 parent 85c6b82 commit f0e45e3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

acceptance/acceptance_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,14 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
270270
config, configPath := internal.LoadConfig(t, dir)
271271
skipReason := getSkipReason(&config, configPath)
272272

273+
if testdiff.OverwriteMode {
274+
// Generate materialized config for this test
275+
// We do this before skipping the test, so the configs are generated for all tests.
276+
materializedConfig, err := internal.GenerateMaterializedConfig(config)
277+
require.NoError(t, err)
278+
testutil.WriteFile(t, filepath.Join(dir, internal.MaterializedConfigFile), materializedConfig)
279+
}
280+
273281
if skipReason != "" {
274282
skippedDirs += 1
275283
t.Skip(skipReason)

0 commit comments

Comments
 (0)