From 894f4aab4ee3ec7eefaf7898a17fddb0917e7bfd Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Tue, 24 Sep 2024 17:54:13 +0200 Subject: [PATCH] fix windows test --- bundle/config/loader/process_include_test.go | 4 ++-- bundle/render/render_text_output_test.go | 14 +++----------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/bundle/config/loader/process_include_test.go b/bundle/config/loader/process_include_test.go index ebd923575..1451d6fed 100644 --- a/bundle/config/loader/process_include_test.go +++ b/bundle/config/loader/process_include_test.go @@ -60,8 +60,8 @@ func TestProcessIncludeValidatesFileFormat(t *testing.T) { Severity: diag.Info, Summary: "We recommend only defining a single job in a file with the .job.yml extension.\nThe following resources are defined or configured in this file:\n - bar (job)\n - foo (job)\n", Locations: []dyn.Location{ - {File: "testdata/format/foo.job.yml", Line: 4, Column: 7}, - {File: "testdata/format/foo.job.yml", Line: 7, Column: 7}, + {File: filepath.FromSlash("testdata/format/foo.job.yml"), Line: 4, Column: 7}, + {File: filepath.FromSlash("testdata/format/foo.job.yml"), Line: 7, Column: 7}, }, Paths: []dyn.Path{ dyn.MustPathFromString("resources.jobs.bar"), diff --git a/bundle/render/render_text_output_test.go b/bundle/render/render_text_output_test.go index a64ab1e0e..8d72298f4 100644 --- a/bundle/render/render_text_output_test.go +++ b/bundle/render/render_text_output_test.go @@ -340,7 +340,7 @@ func TestRenderDiagnostics(t *testing.T) { "'name' is required\n\n", }, { - name: "error with multiple paths and locations", + name: "info with multiple paths and locations", diags: diag.Diagnostics{ { Severity: diag.Info, @@ -351,16 +351,8 @@ func TestRenderDiagnostics(t *testing.T) { dyn.MustPathFromString("resources.jobs.yyy"), }, Locations: []dyn.Location{ - { - File: "foo.yaml", - Line: 1, - Column: 2, - }, - { - File: "bar.yaml", - Line: 3, - Column: 4, - }, + {File: "foo.yaml", Line: 1, Column: 2}, + {File: "bar.yaml", Line: 3, Column: 4}, }, }, },