Skip to content

Commit 70fef91

Browse files
denikclaude
andauthored
Skip local+cloud tests on cloud when run on PRs (#4531)
## Changes - Only run integration tests on PRs if they don't have local counterpart. - Replace -skiplocal option with DATABRICKS_TEST_SKIPLOCAL env var so that multiple test packages can be run together ## Why The integration tests are now taking more than >1.5h. This drops the time back to 10m. Once we convert more tests from cloud-only to cloud+local (like #4507) we'll drop it further until eventually it becomes 0. All tests will still run on cloud on main, so they act as async check that testserver implementation matches cloud well enough. --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent f3d416b commit 70fef91

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ generate-out-test-toml:
9393

9494
# Updates acceptance test output (integration tests, requires access)
9595
test-update-aws:
96-
deco env run -i -n aws-prod-ucws -- go test ./acceptance -run ^TestAccept$$ -update -timeout=1h -skiplocal -v
96+
deco env run -i -n aws-prod-ucws -- env DATABRICKS_TEST_SKIPLOCAL=1 go test ./acceptance -run ^TestAccept$$ -update -timeout=1h -v
9797

9898
test-update-all: test-update test-update-aws
9999

@@ -145,7 +145,7 @@ integration:
145145
$(INTEGRATION)
146146

147147
integration-short:
148-
VERBOSE_TEST=1 $(INTEGRATION) -short
148+
DATABRICKS_TEST_SKIPLOCAL=1 VERBOSE_TEST=1 $(INTEGRATION) -short
149149

150150
dbr-integration:
151151
DBR_ENABLED=true go test -v -timeout 4h -run TestDbrAcceptance$$ ./acceptance

acceptance/acceptance_test.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ var (
4343
Forcerun bool
4444
LogRequests bool
4545
LogConfig bool
46-
SkipLocal bool
4746
UseVersion string
4847
WorkspaceTmpDir bool
4948
OnlyOutTestToml bool
@@ -72,7 +71,6 @@ func init() {
7271
flag.BoolVar(&Forcerun, "forcerun", false, "Force running the specified tests, ignore all reasons to skip")
7372
flag.BoolVar(&LogRequests, "logrequests", false, "Log request and responses from testserver")
7473
flag.BoolVar(&LogConfig, "logconfig", false, "Log merged for each test case")
75-
flag.BoolVar(&SkipLocal, "skiplocal", false, "Skip tests that are enabled to run on Local")
7674
flag.StringVar(&UseVersion, "useversion", "", "Download previously released version of CLI and use it to run the tests")
7775

7876
// DABs in the workspace runs on the workspace file system. This flags does the same for acceptance tests
@@ -410,8 +408,8 @@ func getSkipReason(config *internal.TestConfig, configPath string) string {
410408
config.Cloud = config.CloudSlow
411409
}
412410

413-
if SkipLocal && isTruePtr(config.Local) {
414-
return "Disabled via SkipLocal setting in " + configPath
411+
if os.Getenv("DATABRICKS_TEST_SKIPLOCAL") != "" && isTruePtr(config.Local) {
412+
return "Disabled via DATABRICKS_TEST_SKIPLOCAL environment variable in " + configPath
415413
}
416414

417415
if Forcerun {

0 commit comments

Comments
 (0)