mirror of https://github.com/databricks/cli.git
fix: Add dbr runtime context to renderer test
This commit is contained in:
parent
85959acc3e
commit
cf19166fb2
|
@ -17,6 +17,7 @@ import (
|
||||||
"github.com/databricks/cli/bundle/phases"
|
"github.com/databricks/cli/bundle/phases"
|
||||||
"github.com/databricks/cli/cmd/root"
|
"github.com/databricks/cli/cmd/root"
|
||||||
"github.com/databricks/cli/internal/testutil"
|
"github.com/databricks/cli/internal/testutil"
|
||||||
|
"github.com/databricks/cli/libs/dbr"
|
||||||
"github.com/databricks/cli/libs/diag"
|
"github.com/databricks/cli/libs/diag"
|
||||||
"github.com/databricks/cli/libs/filer"
|
"github.com/databricks/cli/libs/filer"
|
||||||
"github.com/databricks/cli/libs/tags"
|
"github.com/databricks/cli/libs/tags"
|
||||||
|
@ -40,7 +41,7 @@ func assertFilePermissions(t *testing.T, path string, perm fs.FileMode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func assertBuiltinTemplateValid(t *testing.T, template string, settings map[string]any, target string, isServicePrincipal, build bool, tempDir string) {
|
func assertBuiltinTemplateValid(t *testing.T, template string, settings map[string]any, target string, isServicePrincipal, build bool, tempDir string) {
|
||||||
ctx := context.Background()
|
ctx := dbr.MockRuntime(context.Background(), false)
|
||||||
|
|
||||||
templateFS, err := fs.Sub(builtinTemplates, path.Join("templates", template))
|
templateFS, err := fs.Sub(builtinTemplates, path.Join("templates", template))
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
Loading…
Reference in New Issue