From 4373e7b513eaa70c509f7cd8cb6f91d896a42c94 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Thu, 26 Sep 2024 17:57:24 +0200 Subject: [PATCH] make unit test package separate --- bundle/config/loader/process_include_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bundle/config/loader/process_include_test.go b/bundle/config/loader/process_include_test.go index dabe66fdc..b052fe853 100644 --- a/bundle/config/loader/process_include_test.go +++ b/bundle/config/loader/process_include_test.go @@ -1,4 +1,4 @@ -package loader +package loader_test import ( "context" @@ -7,6 +7,7 @@ import ( "github.com/databricks/cli/bundle" "github.com/databricks/cli/bundle/config" + "github.com/databricks/cli/bundle/config/loader" "github.com/databricks/cli/libs/diag" "github.com/databricks/cli/libs/dyn" "github.com/stretchr/testify/assert" @@ -23,7 +24,7 @@ func TestProcessInclude(t *testing.T) { }, } - m := ProcessInclude(filepath.Join(b.RootPath, "host.yml"), "host.yml") + m := loader.ProcessInclude(filepath.Join(b.RootPath, "host.yml"), "host.yml") assert.Equal(t, "ProcessInclude(host.yml)", m.Name()) // Assert the host value prior to applying the mutator @@ -52,7 +53,7 @@ func TestProcessIncludeFormatPass(t *testing.T) { }, } - m := ProcessInclude(filepath.Join(b.RootPath, fileName), fileName) + m := loader.ProcessInclude(filepath.Join(b.RootPath, fileName), fileName) diags := bundle.Apply(context.Background(), b, m) assert.Empty(t, diags) }) @@ -162,7 +163,7 @@ func TestProcessIncludeFormatFail(t *testing.T) { }, } - m := ProcessInclude(filepath.Join(b.RootPath, fileName), fileName) + m := loader.ProcessInclude(filepath.Join(b.RootPath, fileName), fileName) diags := bundle.Apply(context.Background(), b, m) require.Len(t, diags, 1) assert.Equal(t, expectedDiags, diags)