fix windows test

This commit is contained in:
Shreyas Goenka 2024-09-24 17:54:13 +02:00
parent e31dcc2724
commit 894f4aab4e
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 5 additions and 13 deletions

View File

@ -60,8 +60,8 @@ func TestProcessIncludeValidatesFileFormat(t *testing.T) {
Severity: diag.Info, 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", 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{ Locations: []dyn.Location{
{File: "testdata/format/foo.job.yml", Line: 4, Column: 7}, {File: filepath.FromSlash("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: 7, Column: 7},
}, },
Paths: []dyn.Path{ Paths: []dyn.Path{
dyn.MustPathFromString("resources.jobs.bar"), dyn.MustPathFromString("resources.jobs.bar"),

View File

@ -340,7 +340,7 @@ func TestRenderDiagnostics(t *testing.T) {
"'name' is required\n\n", "'name' is required\n\n",
}, },
{ {
name: "error with multiple paths and locations", name: "info with multiple paths and locations",
diags: diag.Diagnostics{ diags: diag.Diagnostics{
{ {
Severity: diag.Info, Severity: diag.Info,
@ -351,16 +351,8 @@ func TestRenderDiagnostics(t *testing.T) {
dyn.MustPathFromString("resources.jobs.yyy"), dyn.MustPathFromString("resources.jobs.yyy"),
}, },
Locations: []dyn.Location{ Locations: []dyn.Location{
{ {File: "foo.yaml", Line: 1, Column: 2},
File: "foo.yaml", {File: "bar.yaml", Line: 3, Column: 4},
Line: 1,
Column: 2,
},
{
File: "bar.yaml",
Line: 3,
Column: 4,
},
}, },
}, },
}, },