@@ -37,17 +37,18 @@ import (
3737)
3838
3939var (
40- KeepTmp bool
41- NoRepl bool
42- VerboseTest bool = os .Getenv ("VERBOSE_TEST" ) != ""
43- Tail bool
44- Forcerun bool
45- LogRequests bool
46- LogConfig bool
47- SkipLocal bool
48- UseVersion string
49- WorkspaceTmpDir bool
50- TerraformDir string
40+ KeepTmp bool
41+ NoRepl bool
42+ VerboseTest bool = os .Getenv ("VERBOSE_TEST" ) != ""
43+ Tail bool
44+ Forcerun bool
45+ LogRequests bool
46+ LogConfig bool
47+ SkipLocal bool
48+ UseVersion string
49+ WorkspaceTmpDir bool
50+ TerraformDir string
51+ OnlyOutTestTomlMode bool
5152)
5253
5354// In order to debug CLI running under acceptance test, search for TestInprocessMode and update
@@ -78,6 +79,8 @@ func init() {
7879 // creates these symlinks when a file_mirror is used for a provider (in .terraformrc). This flag
7980 // allows us to download the provider to the workspace file system on DBR enabling DBR integration testing.
8081 flag .StringVar (& TerraformDir , "terraform-dir" , "" , "Directory to download the terraform provider to" )
82+
83+ flag .BoolVar (& OnlyOutTestTomlMode , "only-out-test-toml" , false , "Only regenerate out.test.toml files without running tests" )
8184}
8285
8386const (
@@ -295,7 +298,7 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
295298 config , configPath := internal .LoadConfig (t , dir )
296299 skipReason := getSkipReason (& config , configPath )
297300
298- if testdiff .OverwriteMode || testdiff . OnlyOutTestTomlMode {
301+ if testdiff .OverwriteMode || OnlyOutTestTomlMode {
299302 // Generate materialized config for this test
300303 // We do this before skipping the test, so the configs are generated for all tests.
301304 materializedConfig , err := internal .GenerateMaterializedConfig (config )
@@ -304,7 +307,7 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
304307 }
305308
306309 // If only regenerating out.test.toml, skip the actual test execution
307- if testdiff . OnlyOutTestTomlMode {
310+ if OnlyOutTestTomlMode {
308311 t .Skip ("Skipping test execution (only regenerating out.test.toml)" )
309312 }
310313
0 commit comments