From ee33241b3e8720f7bfdcc865e1d9668b5c779d96 Mon Sep 17 00:00:00 2001 From: Adam Shannon Date: Fri, 30 Jun 2023 10:36:34 -0500 Subject: [PATCH 1/2] build: run Go tests on Windows --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 15fdefee..28e29c45 100644 --- a/makefile +++ b/makefile @@ -16,7 +16,7 @@ build-webui: .PHONY: check check: ifeq ($(OS),Windows_NT) - @echo "Skipping checks on Windows, currently unsupported." + go test ./... else @wget -O lint-project.sh https://raw.githubusercontent.com/moov-io/infra/master/go/lint-project.sh @chmod +x ./lint-project.sh From f814e3af0f323fbf2e5f70c1a794f8dd864cc0d4 Mon Sep 17 00:00:00 2001 From: Adam Shannon Date: Fri, 30 Jun 2023 14:32:21 -0500 Subject: [PATCH 2/2] test: fix variable/EBCDIC windows tests --- reader_test.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/reader_test.go b/reader_test.go index 9e460f3f..69659e16 100644 --- a/reader_test.go +++ b/reader_test.go @@ -14,6 +14,8 @@ import ( "strconv" "strings" "testing" + + "github.com/stretchr/testify/require" ) // TestICLFileRead validates reading an ICL file @@ -103,9 +105,7 @@ func TestICL_ReadVariableLineLengthOption(t *testing.T) { if err != nil { t.Errorf("Issue loading validation criteria: %+v \n", err) } - if !bytes.Equal(actual, expected) { - t.Errorf("Read file does not match expected JSON") - } + require.Equal(t, expected, actual) } func TestICL_EBCDICEncodingOption(t *testing.T) { @@ -134,9 +134,7 @@ func TestICL_EBCDICEncodingOption(t *testing.T) { if err != nil { t.Errorf("Issue loading validation criteria: %+v \n", err) } - if !bytes.Equal(actual, expected) { - t.Errorf("Read file does not match expected JSON") - } + require.Equal(t, expected, actual) } // TestRecordTypeUnknown validates record type unknown