github.com/databricks/cli@v0.203.0/bundle/config/mutator/default_workspace_root_test.go (about) 1 package mutator_test 2 3 import ( 4 "context" 5 "testing" 6 7 "github.com/databricks/cli/bundle" 8 "github.com/databricks/cli/bundle/config" 9 "github.com/databricks/cli/bundle/config/mutator" 10 "github.com/stretchr/testify/assert" 11 "github.com/stretchr/testify/require" 12 ) 13 14 func TestDefaultWorkspaceRoot(t *testing.T) { 15 bundle := &bundle.Bundle{ 16 Config: config.Root{ 17 Bundle: config.Bundle{ 18 Name: "name", 19 Environment: "environment", 20 }, 21 }, 22 } 23 err := mutator.DefineDefaultWorkspaceRoot().Apply(context.Background(), bundle) 24 require.NoError(t, err) 25 assert.Equal(t, "~/.bundle/name/environment", bundle.Config.Workspace.RootPath) 26 }