Skip to content

Commit

Permalink
skip or fix some unit tests on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Will Murphy <[email protected]>
  • Loading branch information
willmurphyscode committed Apr 8, 2024
1 parent df14c0e commit 13182bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package binny
import (
"os"
"path/filepath"
"runtime"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -104,6 +105,9 @@ func TestStore_GetByName(t *testing.T) {
}

func TestStore_Entries(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("test fixtures have different sha256 digests on Windows due to linbreak conversion")
}
tests := []struct {
name string
storeRoot string
Expand Down
3 changes: 3 additions & 0 deletions tool/goinstall/installer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package goinstall

import (
"fmt"
"os"
"strings"
"testing"

"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -108,6 +110,7 @@ func TestInstaller_InstallTo(t *testing.T) {
i.goInstallRunner = tt.fields.goInstallRunner

got, err := i.InstallTo(tt.args.version, tt.args.destDir)
got = strings.ReplaceAll(got, string(os.PathSeparator), "/")
if !tt.wantErr(t, err, fmt.Sprintf("InstallTo(%v, %v)", tt.args.version, tt.args.destDir)) {
return
}
Expand Down

0 comments on commit 13182bb

Please sign in to comment.