Skip to content

Commit

Permalink
test: fix windwos line ending
Browse files Browse the repository at this point in the history
  • Loading branch information
szkiba committed Jul 9, 2024
1 parent 5276b91 commit 56c5f19
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func Test_newLocalBuildService(t *testing.T) {
abs, err := filepath.Abs(filepath.Join("testdata", "minimal-catalog.json"))
require.NoError(t, err)

u, err := url.Parse("file:///" + filepath.ToSlash(abs))
u, err := url.Parse("file://" + filepath.ToSlash(abs))
require.NoError(t, err)

opts := &Options{ExtensionCatalogURL: u}
Expand Down Expand Up @@ -116,7 +116,7 @@ func Test_httpDownload(t *testing.T) {
contents, err := os.ReadFile(dest.Name())

require.NoError(t, err)
require.Equal(t, "{}\n", string(contents))
require.Equal(t, "{}", strings.TrimSpace(string(contents)))
}

//nolint:forbidigo
Expand All @@ -131,7 +131,7 @@ func Test_fileDownload(t *testing.T) {

require.NoError(t, err)

from, err := url.Parse("file:///" + filepath.ToSlash(abs))
from, err := url.Parse("file://" + filepath.ToSlash(abs))

require.NoError(t, err)

Expand All @@ -147,9 +147,9 @@ func Test_fileDownload(t *testing.T) {
contents, err := os.ReadFile(dest.Name())

require.NoError(t, err)
require.Equal(t, "{}\n", string(contents))
require.Equal(t, "{}", strings.TrimSpace(string(contents)))

from, err = url.Parse("file:///" + tmp + "/no_such_file")
from, err = url.Parse("file://" + tmp + "/no_such_file")

require.NoError(t, err)

Expand Down Expand Up @@ -187,7 +187,7 @@ func Test_download(t *testing.T) {

require.NoError(t, err)

from, err = url.Parse("file:///" + filepath.ToSlash(abs))
from, err = url.Parse("file://" + filepath.ToSlash(abs))

require.NoError(t, err)

Expand Down

0 comments on commit 56c5f19

Please sign in to comment.