This commit is contained in:
Pieter Noordhuis 2025-01-13 17:30:24 +01:00
parent a78e3a25b2
commit 77e159ff92
No known key found for this signature in database
GPG Key ID: 12ACCCC104CF2930
1 changed files with 2 additions and 7 deletions

View File

@ -8,7 +8,6 @@ import (
"github.com/databricks/cli/bundle"
"github.com/databricks/cli/bundle/config/mutator"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestRelativePathsWithIncludes(t *testing.T) {
@ -18,12 +17,8 @@ func TestRelativePathsWithIncludes(t *testing.T) {
diags := bundle.Apply(context.Background(), b, m)
assert.NoError(t, diags.Error())
relA, err := filepath.Rel(b.SyncRootPath, b.Config.Artifacts["test_a"].Path)
require.NoError(t, err)
assert.Equal(t, "artifact_a", relA)
relB, err := filepath.Rel(b.SyncRootPath, b.Config.Artifacts["test_b"].Path)
require.NoError(t, err)
assert.Equal(t, filepath.Join("subfolder", "artifact_b"), relB)
assert.Equal(t, filepath.Join(b.SyncRootPath, "artifact_a"), b.Config.Artifacts["test_a"].Path)
assert.Equal(t, filepath.Join(b.SyncRootPath, "subfolder", "artifact_b"), b.Config.Artifacts["test_b"].Path)
assert.ElementsMatch(
t,