mirror of https://github.com/databricks/cli.git
f111b0846e
## Changes This PR makes unit testing with subprocesses fast. ``` ctx := context.Background() ctx, stub := process.WithStub(ctx) stub.WithDefaultOutput("meeee") ctx = env.Set(ctx, "FOO", "bar") out, err := process.Background(ctx, []string{"/usr/local/bin/meeecho", "1", "--foo", "bar"}) require.NoError(t, err) require.Equal(t, "meeee", out) require.Equal(t, 1, stub.Len()) require.Equal(t, []string{"meeecho 1 --foo bar"}, stub.Commands()) allEnv := stub.CombinedEnvironment() require.Equal(t, "bar", allEnv["FOO"]) require.Equal(t, "bar", stub.LookupEnv("FOO")) ``` This should make further iterations of https://github.com/databricks/cli/pull/914 easier ## Tests `make test` |
||
---|---|---|
.codegen | ||
.github | ||
.vscode | ||
bundle | ||
cmd | ||
docs | ||
folders | ||
internal | ||
libs | ||
.codegen.json | ||
.gitattributes | ||
.gitignore | ||
.goreleaser.yaml | ||
CHANGELOG.md | ||
LICENSE | ||
Makefile | ||
NOTICE | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go | ||
main_test.go |
README.md
Databricks CLI
This project is in Public Preview.
Documentation about the full REST API coverage is available in the docs folder.
Documentation is available at https://docs.databricks.com/dev-tools/cli/databricks-cli.html.
Installation
This CLI is packaged as a dependency-free binary executable and may be located in any directory. See https://github.com/databricks/cli/releases for releases and the docs pages for installation instructions.
Authentication
This CLI follows the Databricks Unified Authentication principles.
You can find a detailed description at https://github.com/databricks/databricks-sdk-go#authentication.