Compare commits

..

No commits in common. "fc3ae6371e194269ed59404abc04cfb6654800b2" and "ea3dcc5f3a5491179c6029151a88e07a7dc4ac5f" have entirely different histories.

1 changed files with 8 additions and 51 deletions

View File

@ -10,7 +10,6 @@ import (
"path" "path"
"regexp" "regexp"
"strings" "strings"
"sync"
"testing" "testing"
"github.com/databricks/cli/libs/filer" "github.com/databricks/cli/libs/filer"
@ -362,23 +361,9 @@ func TestFilerReadDir(t *testing.T) {
} }
} }
func TestAccFilerWorkspaceNotebook(t *testing.T) { func TestFilerWorkspaceNotebook(t *testing.T) {
t.Parallel() t.Parallel()
wg := sync.WaitGroup{}
for i := 0; i < 10; i++ {
wg.Add(1)
go func() {
testAccFilerWorkspacenotebook(t)
wg.Done()
}()
}
wg.Wait()
}
func testAccFilerWorkspacenotebook(t *testing.T) {
ctx := context.Background() ctx := context.Background()
var err error var err error
@ -483,6 +468,7 @@ func testAccFilerWorkspacenotebook(t *testing.T) {
filerTest{t, f}.assertContents(ctx, tc.nameWithoutExt, tc.expected2) filerTest{t, f}.assertContents(ctx, tc.nameWithoutExt, tc.expected2)
}) })
} }
} }
func TestFilerWorkspaceFilesExtensionsReadDir(t *testing.T) { func TestFilerWorkspaceFilesExtensionsReadDir(t *testing.T) {
@ -626,7 +612,9 @@ func TestFilerWorkspaceFilesExtensionsRead(t *testing.T) {
assert.ErrorIs(t, err, fs.ErrNotExist) assert.ErrorIs(t, err, fs.ErrNotExist)
} }
func testAccFilerWorkspaceFilesExtensionsDelete(t *testing.T) { func TestFilerWorkspaceFilesExtensionsDelete(t *testing.T) {
t.Parallel()
ctx := context.Background() ctx := context.Background()
wf := setupFilerWithExtensionsTest(t) wf := setupFilerWithExtensionsTest(t)
@ -671,23 +659,6 @@ func testAccFilerWorkspaceFilesExtensionsDelete(t *testing.T) {
err = wf.Delete(ctx, "dir", filer.DeleteRecursively) err = wf.Delete(ctx, "dir", filer.DeleteRecursively)
require.NoError(t, err) require.NoError(t, err)
filerTest{t, wf}.assertNotExists(ctx, "dir") filerTest{t, wf}.assertNotExists(ctx, "dir")
}
func TestAccFilerWorkspaceFilesExtensionsDelete(t *testing.T) {
t.Parallel()
wg := sync.WaitGroup{}
for i := 0; i < 10; i++ {
wg.Add(1)
go func() {
testAccFilerWorkspaceFilesExtensionsDelete(t)
wg.Done()
}()
}
wg.Wait()
} }
func TestFilerWorkspaceFilesExtensionsStat(t *testing.T) { func TestFilerWorkspaceFilesExtensionsStat(t *testing.T) {
@ -790,7 +761,9 @@ func TestWorkspaceFilesExtensionsNotebooksAreNotStatAsFiles(t *testing.T) {
assert.NoError(t, err) assert.NoError(t, err)
} }
func testAccWorkspaceFilesExtensionsNotebooksAreNotDeletedAsFiles(t *testing.T) { func TestAccWorkspaceFilesExtensionsNotebooksAreNotDeletedAsFiles(t *testing.T) {
t.Parallel()
ctx := context.Background() ctx := context.Background()
wf, _ := setupWsfsExtensionsFiler(t) wf, _ := setupWsfsExtensionsFiler(t)
@ -807,22 +780,6 @@ func testAccWorkspaceFilesExtensionsNotebooksAreNotDeletedAsFiles(t *testing.T)
assert.NoError(t, err) assert.NoError(t, err)
} }
func TestAccWorkspaceFilesExtensionsNotebooksAreNotDeletedAsFiles(t *testing.T) {
t.Parallel()
wg := sync.WaitGroup{}
for i := 0; i < 10; i++ {
wg.Add(1)
go func() {
testAccWorkspaceFilesExtensionsNotebooksAreNotDeletedAsFiles(t)
wg.Done()
}()
}
wg.Wait()
}
func TestWorkspaceFilesExtensions_ExportFormatIsPreserved(t *testing.T) { func TestWorkspaceFilesExtensions_ExportFormatIsPreserved(t *testing.T) {
t.Parallel() t.Parallel()