Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,14 +416,20 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
expanded = internal.SubsetExpanded(expanded, dir, scriptUsesEngine)
}

for ind, envset := range expanded {
envname := strings.Join(envset, "/")
t.Run(envname, func(t *testing.T) {
if runParallel {
t.Parallel()
}
runTest(t, dir, ind, coverDir, repls.Clone(), config, envset, envFilters)
})
// If the matrix expands to a single empty envset, run the test directly
// without creating a subtest (avoids the "#00" dummy subtest name).
if len(expanded) == 1 && len(expanded[0]) == 0 {
runTest(t, dir, 0, coverDir, repls.Clone(), config, nil, envFilters)
} else {
for ind, envset := range expanded {
envname := strings.Join(envset, "/")
t.Run(envname, func(t *testing.T) {
if runParallel {
t.Parallel()
}
runTest(t, dir, ind, coverDir, repls.Clone(), config, envset, envFilters)
})
}
}
})
}
Expand Down
5 changes: 5 additions & 0 deletions acceptance/selftest/envmatrix_empty/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/selftest/envmatrix_empty/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
1 change: 1 addition & 0 deletions acceptance/selftest/envmatrix_empty/script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo hello
4 changes: 4 additions & 0 deletions acceptance/selftest/envmatrix_empty/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Local = true

[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = []
7 changes: 7 additions & 0 deletions acceptance/selftest/envmatrix_mixed/out.test.toml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions acceptance/selftest/envmatrix_mixed/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FIRST=[FIRST]
1 change: 1 addition & 0 deletions acceptance/selftest/envmatrix_mixed/script
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
echo "FIRST=$FIRST"
6 changes: 6 additions & 0 deletions acceptance/selftest/envmatrix_mixed/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Local = true

[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = []
FIRST = ["alpha", "beta"]
SECOND = []
Loading