fix import cycle

This commit is contained in:
Shreyas Goenka 2024-05-16 15:23:46 +02:00
parent 9865cdd525
commit 9e0291e1b7
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 1 additions and 5 deletions

View File

@ -1,12 +1,10 @@
package config package config
import ( import (
"context"
"encoding/json" "encoding/json"
"reflect" "reflect"
"testing" "testing"
"github.com/databricks/cli/bundle"
"github.com/databricks/cli/bundle/config/variable" "github.com/databricks/cli/bundle/config/variable"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
@ -33,11 +31,9 @@ func TestRootLoad(t *testing.T) {
} }
func TestDuplicateIdOnLoadReturnsErrorForJobAndPipeline(t *testing.T) { func TestDuplicateIdOnLoadReturnsErrorForJobAndPipeline(t *testing.T) {
b, diags := Load("./testdata/duplicate_resource_names_in_root_job_and_pipeline/databricks.yml") _, diags := Load("./testdata/duplicate_resource_names_in_root_job_and_pipeline/databricks.yml")
assert.NoError(t, diags.Error()) assert.NoError(t, diags.Error())
diags = bundle.Apply(context.Background(), b, validate.PreInitialize())
assert.ErrorContains(t, diags.Error(), "multiple resources named foo (job at ./testdata/duplicate_resource_names_in_root_job_and_pipeline/databricks.yml:10:7, pipeline at ./testdata/duplicate_resource_names_in_root_job_and_pipeline/databricks.yml:13:7)") assert.ErrorContains(t, diags.Error(), "multiple resources named foo (job at ./testdata/duplicate_resource_names_in_root_job_and_pipeline/databricks.yml:10:7, pipeline at ./testdata/duplicate_resource_names_in_root_job_and_pipeline/databricks.yml:13:7)")
} }