databricks-cli/internal/testcli
Pieter Noordhuis dc3a157fdc
Remove cleanup in testcli package (#2108)
## Changes

The main CLI entry point used to be a global variable, and the global
state had to be cleaned up after every test run. This hasn't been the
case for a while, and instead, the CLI is initialized in a function
call. State accumulated by a single CLI "instance" can no longer leak
into other instances, so we no longer have to perform cleanup.

## Tests

Existing tests pass.
2025-01-10 10:16:53 +00:00
..
README.md Move the CLI test runner to `internal/testcli` package (#2004) 2024-12-12 16:48:51 +00:00
golden.go Improve test output to include correct location (#2058) 2025-01-02 10:49:21 +01:00
runner.go Remove cleanup in testcli package (#2108) 2025-01-10 10:16:53 +00:00

README.md

testcli

This package provides a way to run the CLI from tests as if it were a separate process. By running the CLI inline we can still set breakpoints and step through execution.

It transitively imports pretty much this entire repository, which is why we intentionally keep this package separate from testutil.