Skip to content

Commit 47b2cfb

Browse files
committed
acc: drop DATABRICKS_TEST_SKIPLOCAL=true
After Local was removed, =true skipped every acceptance test, which made test-update-aws a no-op. Keep only withchanged for PR cloud runs.
1 parent aebca14 commit 47b2cfb

3 files changed

Lines changed: 6 additions & 23 deletions

File tree

Taskfile.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -584,19 +584,10 @@ tasks:
584584
cmds:
585585
- "go test ./acceptance -run '^TestAccept/bundle/templates' -update -timeout=${LOCAL_TIMEOUT:-60m}"
586586

587-
test-update-aws:
588-
desc: Update acceptance test output (integration, requires deco access)
589-
sources: *ACC_SOURCES_UPDATE
590-
generates: *ACC_GENERATES_UPDATE
591-
cmds:
592-
- "deco env run -i -n aws-prod-ucws -- env DATABRICKS_TEST_SKIPLOCAL=true go test ./acceptance -run ^TestAccept$ -update -timeout=1h -v"
593-
594587
test-update-all:
595588
desc: Update all acceptance test outputs
596-
# Sequential: both tasks overwrite the same acceptance output files.
597589
cmds:
598590
- task: test-update
599-
- task: test-update-aws
600591

601592
# Follows upstream HEAD, so its result changes over time: keep it out of
602593
# `generate-check`, which requires byte-for-byte reproducible output.

acceptance/acceptance_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ func testAccept(t *testing.T, inprocessMode bool, singleTest string) int {
449449
subset := newSubsetSelector(t, testdiff.OverwriteMode, Forcerun)
450450

451451
switch skipLocalMode {
452-
case "", SkipLocalAll, SkipLocalWithChanged:
452+
case "", SkipLocalWithChanged:
453453
default:
454-
t.Fatalf("Unsupported %s=%q, expected %q or %q", SkipLocalEnvVar, skipLocalMode, SkipLocalAll, SkipLocalWithChanged)
454+
t.Fatalf("Unsupported %s=%q, expected %q", SkipLocalEnvVar, skipLocalMode, SkipLocalWithChanged)
455455
}
456456
skipLocalWithChanged := skipLocalMode == SkipLocalWithChanged
457457

@@ -657,10 +657,7 @@ func validateTestPhase(phase int) error {
657657
// skipLocalMode is the value of DATABRICKS_TEST_SKIPLOCAL read once at startup.
658658
// changedTests maps test dirs to extra env filters; nil map means feature is off.
659659
func getSkipReason(config *internal.TestConfig, configPath, dir, skipLocalMode string, changedTests map[string][]string) string {
660-
switch skipLocalMode {
661-
case SkipLocalAll:
662-
return "Disabled via DATABRICKS_TEST_SKIPLOCAL=" + SkipLocalAll + " in " + configPath
663-
case SkipLocalWithChanged:
660+
if skipLocalMode == SkipLocalWithChanged {
664661
if _, ok := changedTests[dir]; !ok {
665662
return "Disabled via DATABRICKS_TEST_SKIPLOCAL=" + SkipLocalWithChanged + " in " + configPath
666663
}

acceptance/skiplocal_test.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,14 @@ import (
99
"testing"
1010
)
1111

12-
// DATABRICKS_TEST_SKIPLOCAL skips acceptance tests on cloud runs. All tests already
13-
// run locally against the testserver; withchanged re-enables tests this branch touches.
12+
// Cloud PR runs set DATABRICKS_TEST_SKIPLOCAL=withchanged to skip acceptance
13+
// tests that already run locally, except those this branch touches.
1414
const (
1515
SkipLocalEnvVar = "DATABRICKS_TEST_SKIPLOCAL"
1616

17-
// SkipLocalAll skips every acceptance test.
18-
SkipLocalAll = "true"
19-
// SkipLocalWithChanged skips acceptance tests except those added or changed
20-
// relative to origin/main.
2117
SkipLocalWithChanged = "withchanged"
2218

23-
// maxChangedLocalTests caps how many changed tests SkipLocalWithChanged re-enables,
24-
// keeping the cloud run bounded. Added tests are preferred over modified ones.
19+
// Cap re-enabled tests so cloud PR runs stay bounded; prefer added over modified.
2520
maxChangedLocalTests = 50
2621

2722
invariantConfigsPrefix = "acceptance/bundle/invariant/configs/"

0 commit comments

Comments
 (0)