databricks-cli/internal/testcli
Pieter Noordhuis e472b5d888
Move the CLI test runner to `internal/testcli` package (#2004)
## Changes

The CLI test runner instantiates a new CLI "instance" through
`cmd.New()` and runs it with specified arguments. This is as close as we
get to running the real CLI **in-process**. This runner was located in
the `internal` package next to other helpers. This change moves it to
its own dedicated package.

Note: this runner transitively imports pretty much the entire
repository, which is why we intentionally keep it _separate_ from
`testutil`.

## Tests

n/a
2024-12-12 16:48:51 +00:00
..
README.md Move the CLI test runner to `internal/testcli` package (#2004) 2024-12-12 16:48:51 +00:00
runner.go Move the CLI test runner to `internal/testcli` package (#2004) 2024-12-12 16:48:51 +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.