remove underscore

This commit is contained in:
Shreyas Goenka 2023-06-05 18:07:41 +02:00
parent 709987448a
commit 0f1cb67c98
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 7 additions and 7 deletions

View File

@ -11,7 +11,7 @@ import (
// TODO: add some comments here
var importDirCmd = &cobra.Command{
Use: "import_dir SOURCE_PATH TARGET_PATH",
Use: "import-dir SOURCE_PATH TARGET_PATH",
Short: `Recursively imports a directory from local to the Databricks workspace.`,
Long: `
Imports directory to the workspace.

View File

@ -22,8 +22,8 @@ func TestWorkspaceImportDir(t *testing.T) {
w := databricks.Must(databricks.NewWorkspaceClient())
tmpdir := temporaryWorkspaceDir(t, w)
// run import_dir command
RequireSuccessfulRun(t, "workspace", "import_dir", "./testdata/import_dir/default", tmpdir)
// run import-dir command
RequireSuccessfulRun(t, "workspace", "import-dir", "./testdata/import_dir/default", tmpdir)
// assert files are uploaded
f, err := filer.NewWorkspaceFilesClient(w, tmpdir)
@ -41,8 +41,8 @@ func TestWorkspaceImportDirOverwriteFlag(t *testing.T) {
w := databricks.Must(databricks.NewWorkspaceClient())
tmpdir := temporaryWorkspaceDir(t, w)
// run import_dir command
RequireSuccessfulRun(t, "workspace", "import_dir", "./testdata/import_dir/override/a", tmpdir)
// run import-dir command
RequireSuccessfulRun(t, "workspace", "import-dir", "./testdata/import_dir/override/a", tmpdir)
// // assert files are uploaded
// f, err := filer.NewWorkspaceFilesClient(w, tmpdir)
@ -50,11 +50,11 @@ func TestWorkspaceImportDirOverwriteFlag(t *testing.T) {
// assertFileContains(t, ctx, f, "bar.txt", "from directory A")
// Assert another run fails with path already exists error from the server
_, _, err := RequireErrorRun(t, "workspace", "import_dir", "./testdata/import_dir/override/b", tmpdir)
_, _, err := RequireErrorRun(t, "workspace", "import-dir", "./testdata/import_dir/override/b", tmpdir)
assert.Regexp(t, regexp.MustCompile("Path (.*) already exists."), err.Error())
// // Succeeds with the overwrite flag
// RequireSuccessfulRun(t, "workspace", "import_dir", "./testdata/import_dir/override/b", tmpdir, "--overwrite")
// RequireSuccessfulRun(t, "workspace", "import-dir", "./testdata/import_dir/override/b", tmpdir, "--overwrite")
// require.NoError(t, err)
// assertFileContains(t, ctx, f, "bar.txt", "from directory B")
}