2024-07-10 06:38:06 +00:00
|
|
|
package internal
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2024-12-12 16:48:51 +00:00
|
|
|
"github.com/databricks/cli/internal/testcli"
|
2024-07-10 06:38:06 +00:00
|
|
|
assert "github.com/databricks/cli/libs/dyn/dynassert"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestUnknownCommand(t *testing.T) {
|
2024-12-12 16:48:51 +00:00
|
|
|
stdout, stderr, err := testcli.RequireErrorRun(t, "unknown-command")
|
2024-07-10 06:38:06 +00:00
|
|
|
|
|
|
|
assert.Error(t, err, "unknown command", `unknown command "unknown-command" for "databricks"`)
|
|
|
|
assert.Equal(t, "", stdout.String())
|
|
|
|
assert.Contains(t, stderr.String(), "unknown command")
|
|
|
|
}
|