databricks-cli/libs/dbr
Pieter Noordhuis 1508d65c4c
Extract functionality to detect if the CLI is running on DBR (#1889)
## Changes

Whether or not the CLI is running on DBR can be detected once and stored
in the command's context.

By storing it in the context, it can easily be mocked for testing.

This builds on the simpler approach and conversation in #1744. It
unblocks testing of the DBR-specific paths while not compromising on the
checks we can perform to test if the CLI is running on DBR.

## Tests

* Unit tests for the new `dbr` package
* New unit test for the `ConfigureWSFS` mutator
2024-11-14 16:10:45 +00:00
..
context.go Extract functionality to detect if the CLI is running on DBR (#1889) 2024-11-14 16:10:45 +00:00
context_test.go Extract functionality to detect if the CLI is running on DBR (#1889) 2024-11-14 16:10:45 +00:00
detect.go Extract functionality to detect if the CLI is running on DBR (#1889) 2024-11-14 16:10:45 +00:00
detect_test.go Extract functionality to detect if the CLI is running on DBR (#1889) 2024-11-14 16:10:45 +00:00