Run a CLI acceptance test against DMS in Litebox - #6780
Open
shreyas-goenka wants to merge 10 commits into
Open
shreyas-goenka wants to merge 10 commits into
shreyas-goenka wants to merge 10 commits into
Conversation
Collaborator
Integration test reportCommit: c642700
Top 3 slowest tests (at least 2 minutes):
|
shreyas-goenka
marked this pull request as ready for review
September 22, 2026 13:05
denik
approved these changes
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") |
Contributor
There was a problem hiding this comment.
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"),
Contributor
Author
There was a problem hiding this comment.
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.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andDMS_LITEBOX_CAconfigured:Companion Universe PR: https://github.com/databricks-eng/universe/pull/2653507.