Skip to content

Run a CLI acceptance test against DMS in Litebox - #6780

Open
shreyas-goenka wants to merge 10 commits into
mainfrom
isaac/dms-litebox-acceptance-poc
Open

shreyas-goenka wants to merge 10 commits into
mainfrom
isaac/dms-litebox-acceptance-poc

Conversation

@shreyas-goenka

@shreyas-goenka shreyas-goenka commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Add opt-in routing from the acceptance runner to local DMS and its shared workspace/ACL fakes in Litebox. DMS, workspace files, workspace objects, and their permissions use the Litebox endpoint; unrelated APIs retain their existing testserver mocks.

Usage

With DMS_LITEBOX_URL, DMS_LITEBOX_WORKSPACE_URL, DMS_LITEBOX_CERT, DMS_LITEBOX_KEY, and DMS_LITEBOX_CA configured:

go test ./acceptance -run '^TestDmsAcc$/bundle/dms/no-resources$' -count=1

Companion Universe PR: https://github.com/databricks-eng/universe/pull/2653507.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: c642700

Run: 35852442336

Env 🔄​flaky ✅​pass 🙈​skip Time
✅​ aws linux 276 16 7:23
🔄​ aws windows 1 277 14 7:58
✅​ azure linux 275 16 7:51
✅​ azure windows 277 14 5:47
✅​ gcp linux 276 16 6:10
✅​ gcp windows 278 14 5:07
Test Name aws windows
🔄​ TestSyncNestedFolderDoesntFailOnNonEmptyDirectory 🔄​f
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:55 azure windows TestAccept
3:21 gcp windows TestAccept
3:20 aws windows TestAccept

@shreyas-goenka
shreyas-goenka marked this pull request as ready for review September 22, 2026 13:05
@shreyas-goenka shreyas-goenka changed the title POC: run a CLI acceptance test against DMS in Litebox Run a CLI acceptance test against DMS in Litebox Sep 22, 2026
// to its shared fakes, retaining request recording and mocks for other APIs.
func configureDMSLitebox(t *testing.T, server *testserver.Server) {
t.Helper()
endpoint := env.Get(t.Context(), "DMS_LITEBOX_URL")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we typically use os.Getenv here.

% git grep os.Getenv
acceptance_test.go:     VerboseTest     bool = os.Getenv("VERBOSE_TEST") != ""
acceptance_test.go:var benchmarkMode = os.Getenv("BENCHMARK_PARAMS") != ""
acceptance_test.go:var IsRunningOnCI = os.Getenv("GITHUB_WORKFLOW") != ""
acceptance_test.go:     if v := os.Getenv("DATABRICKS_CLI_TEST_MAX_LOG"); v != "" {
acceptance_test.go:     if os.Getenv("CLOUD_ENV") != "" {
acceptance_test.go:     if os.Getenv(selection.EnvVar) != "" {
acceptance_test.go:             if value := os.Getenv(envVar); value != "" {
acceptance_test.go:     coverDir := os.Getenv("CLI_GOCOVERDIR")
acceptance_test.go:             os.Getenv("PATH"),
acceptance_test.go:     cloudEnv := os.Getenv("CLOUD_ENV")
acceptance_test.go:             if os.Getenv("TEST_DEFAULT_WAREHOUSE_ID") == "" {
acceptance_test.go:             if os.Getenv("TEST_DEFAULT_CLUSTER_ID") == "" {
acceptance_test.go:             if os.Getenv("TEST_INSTANCE_POOL_ID") == "" {
acceptance_test.go:     changedLimit, err := selection.ParseLimit(os.Getenv(selection.EnvVar))
acceptance_test.go:     envFilterValue := os.Getenv(EnvFilterVar)
acceptance_test.go:     cloudEnv := os.Getenv("CLOUD_ENV")
acceptance_test.go:     runID := os.Getenv("GITHUB_RUN_ID")
acceptance_test.go:     cloudEnv := os.Getenv("CLOUD_ENV")
acceptance_test.go:     rateLimit := os.Getenv("DATABRICKS_RATE_LIMIT")
dbr_test.go:            "cloud_env":                 os.Getenv("CLOUD_ENV"),
dbr_test.go:            "test_default_warehouse_id": os.Getenv("TEST_DEFAULT_WAREHOUSE_ID"),
dbr_test.go:            "test_default_cluster_id":   os.Getenv("TEST_DEFAULT_CLUSTER_ID"),
dbr_test.go:            "test_instance_pool_id":     os.Getenv("TEST_INSTANCE_POOL_ID"),
dbr_test.go:            "test_metastore_id":         os.Getenv("TEST_METASTORE_ID"),
dbr_test.go:            "test_user_email":           os.Getenv("TEST_USER_EMAIL"),
dbr_test.go:            "test_sp_application_id":    os.Getenv("TEST_SP_APPLICATION_ID"),
dbr_test.go:    cloudEnv := os.Getenv("CLOUD_ENV")
dbr_test.go:    if os.Getenv("DBR_ENABLED") != "true" {
dbr_test.go:    if os.Getenv("CLOUD_ENV") == "" {
dbr_test.go:            verbose: os.Getenv("DBR_TEST_VERBOSE") != "",
internal/python.go:     t.Setenv("PATH", binDir+string(os.PathListSeparator)+os.Getenv("PATH")) //nolint:forbidigo // acceptance test harness; no ctx for libs/env
subset_test.go: raw := os.Getenv(SubsetPctEnvVar)

These should be cleaned up:

% git grep -w env.Get
cleanup/main.go:        runID := env.Get(ctx, "GITHUB_RUN_ID")
internal/prepare_server.go:     cloudEnv := env.Get(t.Context(), "CLOUD_ENV")
internal/prepare_server.go:                     Host:  env.Get(t.Context(), "DATABRICKS_DEFAULT_HOST"),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a linter enforcing that env.Get be used for all files that are not _test.go. I'll keep using it for now, we'll need to fix this separately if we want to.

@shreyas-goenka
shreyas-goenka removed the request for review from renaudhartert-db September 23, 2026 11:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants