fix more tests

This commit is contained in:
Shreyas Goenka 2024-05-02 16:43:38 +02:00
parent 737903b773
commit 82f00ad1f6
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 3 additions and 3 deletions

View File

@ -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))
}