-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Rename "in-place" to "source-linked"
- Loading branch information
1 parent
e8825d5
commit 1d7b27e
Showing
6 changed files
with
24 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -520,31 +520,31 @@ func TestPipelinesDevelopmentDisabled(t *testing.T) { | |
assert.False(t, b.Config.Resources.Pipelines["pipeline1"].PipelineSpec.Development) | ||
} | ||
|
||
func TestInPlaceDeploymentEnabled(t *testing.T) { | ||
b, diags := processInPlaceBundle(t, true) | ||
func TestSourceLinkedDeploymentEnabled(t *testing.T) { | ||
b, diags := processSourceLinkedBundle(t, true) | ||
require.NoError(t, diags.Error()) | ||
assert.True(t, *b.Config.Presets.InPlaceDeployment) | ||
assert.True(t, *b.Config.Presets.SourceLinkedDeployment) | ||
assert.Equal(t, b.Config.Workspace.FilePath, b.SyncRootPath) | ||
} | ||
|
||
func TestInPlaceDeploymentDisabled(t *testing.T) { | ||
b, diags := processInPlaceBundle(t, false) | ||
func TestSourceLinkedDeploymentDisabled(t *testing.T) { | ||
b, diags := processSourceLinkedBundle(t, false) | ||
require.NoError(t, diags.Error()) | ||
assert.False(t, *b.Config.Presets.InPlaceDeployment) | ||
assert.False(t, *b.Config.Presets.SourceLinkedDeployment) | ||
assert.NotEqual(t, b.Config.Workspace.FilePath, b.SyncRootPath) | ||
} | ||
|
||
func processInPlaceBundle(t *testing.T, presetEnabled bool) (*bundle.Bundle, diag.Diagnostics) { | ||
func processSourceLinkedBundle(t *testing.T, presetEnabled bool) (*bundle.Bundle, diag.Diagnostics) { | ||
if runtime.GOOS == "windows" { | ||
t.Skip("this test is not applicable on Windows because in-place works only in the Databricks Workspace") | ||
t.Skip("this test is not applicable on Windows because source-linked mode works only in the Databricks Workspace") | ||
} | ||
|
||
b := mockBundle(config.Development) | ||
|
||
workspacePath := "/Workspace/[email protected]/" | ||
b.SyncRoot = vfs.MustNew(workspacePath) | ||
b.SyncRootPath = workspacePath | ||
b.Config.Presets.InPlaceDeployment = &presetEnabled | ||
b.Config.Presets.SourceLinkedDeployment = &presetEnabled | ||
|
||
ctx := dbr.MockRuntime(context.Background(), true) | ||
m := bundle.Seq(ProcessTargetMode(), ApplyPresets()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters