Skip to content
Open
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
11 changes: 4 additions & 7 deletions acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1581,17 +1581,14 @@ func loadUserReplacements(t *testing.T, repls *testdiff.ReplacementsContext, tmp

type pathFilter struct {
// contains substrings from the variants other than current.
// E.g. if EnvVaryOutput is DATABRICKS_BUNDLE_ENGINE and current test running DATABRICKS_BUNDLE_ENGINE="terraform" then
// notSelected contains ".direct." meaning if filename contains that (e.g. out.deploy.direct.txt) then we ignore it here.
// E.g. current test running DATABRICKS_BUNDLE_ENGINE="terraform" means
// notSelected contains ".direct." so files like out.deploy.direct.txt are ignored.
notSelected []string
}

// preparePathFilter builds filter based on EnvVaryOutput and current variant env.
// preparePathFilter builds filter based on DATABRICKS_BUNDLE_ENGINE and current variant env.
func preparePathFilter(config internal.TestConfig, customEnv []string) pathFilter {
if config.EnvVaryOutput == nil {
return pathFilter{}
}
key := *config.EnvVaryOutput
const key = "DATABRICKS_BUNDLE_ENGINE"
vals := config.EnvMatrix[key]
if len(vals) <= 1 {
return pathFilter{}
Expand Down
3 changes: 0 additions & 3 deletions acceptance/bundle/test.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This allows recording per-deployment output files, e.g. $CLI bundle deploy > out.$DATABRICKS_BUNDLE_ENGINE.txt
EnvVaryOutput = "DATABRICKS_BUNDLE_ENGINE"

# The lowest Python version we support. Alternative to "uv run --python 3.10"
Env.UV_PYTHON = "3.10"

Expand Down
5 changes: 0 additions & 5 deletions acceptance/internal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ type TestConfig struct {
// List of keys for which to do string replacement value -> [KEY]. If not set, defaults to true.
EnvRepl map[string]bool

// Name of EnvMatrix key that determines variant-specific output file names.
// If set and present in EnvMatrix, update mode will run all variants for this key,
// and comparison will only consider files containing the current variant value.
EnvVaryOutput *string

// Maximum amount of time the test is allowed to run, will be killed after that.
Timeout time.Duration

Expand Down
2 changes: 0 additions & 2 deletions acceptance/selftest/envoutput/test.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
EnvVaryOutput = "DATABRICKS_BUNDLE_ENGINE"

[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"]
1 change: 0 additions & 1 deletion acceptance/selftest/subset_ancestor_engine/child/test.toml
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
EnvVaryOutput = "DATABRICKS_BUNDLE_ENGINE"
Loading