Skip to content

Commit bb774b8

Browse files
authored
Fix incorrect test selection when -update if present (#4174)
## Why If -update flag is present, the test runner does not select the right subtest but picks the first one always. This made sense when all subtests were expected to generate the same output but that's not the case anymore. There is attempt to fix it by checking EnvVaryOutput but that just makes it more confusing. When debugging a test, it is sometimes useful to record output of specific subtest as a comparison base.
1 parent fe1b364 commit bb774b8

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

acceptance/acceptance_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,6 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
333333

334334
expanded := internal.ExpandEnvMatrix(config.EnvMatrix)
335335

336-
if testdiff.OverwriteMode && len(expanded) > 1 {
337-
// All variants of the test are producing the same output,
338-
// there is no need to run the concurrently when updating.
339-
// Exception: if EnvVaryOutput is configured, we must
340-
// run all variants to record variant-specific outputs.
341-
if config.EnvVaryOutput == nil || len(config.EnvMatrix[*config.EnvVaryOutput]) <= 1 {
342-
expanded = expanded[0:1]
343-
}
344-
}
345-
346336
if len(expanded) == 1 {
347337
// env vars aren't part of the test case name, so log them for debugging
348338
if len(expanded[0]) > 0 {

0 commit comments

Comments
 (0)