mirror of https://github.com/databricks/cli.git
fix more tests
This commit is contained in:
parent
737903b773
commit
82f00ad1f6
|
@ -18,7 +18,7 @@ func TestConflictingResourceIdsNoSubconfig(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
diags := bundle.Apply(ctx, b, phases.Load())
|
||||
bundleConfigPath := filepath.FromSlash("conflicting_resource_ids/no_subconfigurations/databricks.yml")
|
||||
assert.ErrorContains(t, diags.Error(), fmt.Sprintf("multiple resources named foo (job at %s, pipeline at %s)", bundleConfigPath, bundleConfigPath))
|
||||
assert.ErrorContains(t, diags.Error(), fmt.Sprintf("multiple resources named foo (job at %s:10:7, pipeline at %s:13:7)", bundleConfigPath, bundleConfigPath))
|
||||
}
|
||||
|
||||
func TestConflictingResourceIdsOneSubconfig(t *testing.T) {
|
||||
|
@ -28,7 +28,7 @@ func TestConflictingResourceIdsOneSubconfig(t *testing.T) {
|
|||
diags := bundle.Apply(ctx, b, phases.Load())
|
||||
bundleConfigPath := filepath.FromSlash("conflicting_resource_ids/one_subconfiguration/databricks.yml")
|
||||
resourcesConfigPath := filepath.FromSlash("conflicting_resource_ids/one_subconfiguration/resources.yml")
|
||||
assert.ErrorContains(t, diags.Error(), fmt.Sprintf("multiple resources named foo (job at %s, pipeline at %s)", bundleConfigPath, resourcesConfigPath))
|
||||
assert.ErrorContains(t, diags.Error(), fmt.Sprintf("multiple resources named foo (job at %s:13:7, pipeline at %s:4:7)", bundleConfigPath, resourcesConfigPath))
|
||||
}
|
||||
|
||||
func TestConflictingResourceIdsTwoSubconfigs(t *testing.T) {
|
||||
|
@ -38,5 +38,5 @@ func TestConflictingResourceIdsTwoSubconfigs(t *testing.T) {
|
|||
diags := bundle.Apply(ctx, b, phases.Load())
|
||||
resources1ConfigPath := filepath.FromSlash("conflicting_resource_ids/two_subconfigurations/resources1.yml")
|
||||
resources2ConfigPath := filepath.FromSlash("conflicting_resource_ids/two_subconfigurations/resources2.yml")
|
||||
assert.ErrorContains(t, diags.Error(), fmt.Sprintf("multiple resources named foo (job at %s, pipeline at %s)", resources1ConfigPath, resources2ConfigPath))
|
||||
assert.ErrorContains(t, diags.Error(), fmt.Sprintf("multiple resources named foo (job at %s:4:7, pipeline at %s:4:7)", resources1ConfigPath, resources2ConfigPath))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue