Skip to content

Commit 6bf78e1

Browse files
address comments
1 parent 249ed6e commit 6bf78e1

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

acceptance/acceptance_test.go

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,18 @@ import (
3737
)
3838

3939
var (
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

8386
const (
@@ -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

libs/testdiff/golden.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ import (
1111
)
1212

1313
var OverwriteMode = false
14-
var OnlyOutTestTomlMode = false
1514

1615
func init() {
1716
flag.BoolVar(&OverwriteMode, "update", false, "Overwrite golden files")
18-
flag.BoolVar(&OnlyOutTestTomlMode, "only-out-test-toml", false, "Only regenerate out.test.toml files without running tests")
1917
}
2018

2119
func ReadFile(t testutil.TestingT, ctx context.Context, filename string) string {

0 commit comments

Comments
 (0)