Skip to content

Commit

Permalink
make unit test package separate
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-goenka committed Sep 26, 2024
1 parent 28917eb commit 4373e7b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bundle/config/loader/process_include_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package loader
package loader_test

import (
"context"
Expand All @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -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)
})
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4373e7b

Please sign in to comment.