mirror of https://github.com/databricks/cli.git
Compare commits
2 Commits
ea3dcc5f3a
...
fc3ae6371e
Author | SHA1 | Date |
---|---|---|
|
fc3ae6371e | |
|
d7f31f9eae |
|
@ -10,6 +10,7 @@ import (
|
|||
"path"
|
||||
"regexp"
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/databricks/cli/libs/filer"
|
||||
|
@ -361,9 +362,23 @@ func TestFilerReadDir(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestFilerWorkspaceNotebook(t *testing.T) {
|
||||
func TestAccFilerWorkspaceNotebook(t *testing.T) {
|
||||
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()
|
||||
var err error
|
||||
|
||||
|
@ -468,7 +483,6 @@ func TestFilerWorkspaceNotebook(t *testing.T) {
|
|||
filerTest{t, f}.assertContents(ctx, tc.nameWithoutExt, tc.expected2)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestFilerWorkspaceFilesExtensionsReadDir(t *testing.T) {
|
||||
|
@ -612,9 +626,7 @@ func TestFilerWorkspaceFilesExtensionsRead(t *testing.T) {
|
|||
assert.ErrorIs(t, err, fs.ErrNotExist)
|
||||
}
|
||||
|
||||
func TestFilerWorkspaceFilesExtensionsDelete(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
func testAccFilerWorkspaceFilesExtensionsDelete(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
wf := setupFilerWithExtensionsTest(t)
|
||||
|
||||
|
@ -659,6 +671,23 @@ func TestFilerWorkspaceFilesExtensionsDelete(t *testing.T) {
|
|||
err = wf.Delete(ctx, "dir", filer.DeleteRecursively)
|
||||
require.NoError(t, err)
|
||||
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) {
|
||||
|
@ -761,9 +790,7 @@ func TestWorkspaceFilesExtensionsNotebooksAreNotStatAsFiles(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestAccWorkspaceFilesExtensionsNotebooksAreNotDeletedAsFiles(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
func testAccWorkspaceFilesExtensionsNotebooksAreNotDeletedAsFiles(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
wf, _ := setupWsfsExtensionsFiler(t)
|
||||
|
||||
|
@ -780,6 +807,22 @@ func TestAccWorkspaceFilesExtensionsNotebooksAreNotDeletedAsFiles(t *testing.T)
|
|||
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) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
Loading…
Reference in New Issue