Skip to content

Commit

Permalink
test: forward-fix test 'json config found, but borked' for go 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
kernle32dll committed Oct 26, 2020
1 parent bd16fa0 commit 1b7f992
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,18 @@ func TestParseConfigFromFolder(t *testing.T) {
folder,
)

// Support for go 1.16 on master
wantOutputEither := fmt.Sprintf(
"Failed to read json config in %s: json: invalid character ']' looking for beginning of object key string\n",
folder,
)

output := &bytes.Buffer{}
if got := ParseConfigFromFolder(output, folder); !reflect.DeepEqual(got, want) {
t.Errorf("ParseConfigFromFolder() = %v, want %v", got, want)
}

if got := output.String(); got != wantOutput {
if got := output.String(); got != wantOutput && got != wantOutputEither {
t.Errorf("ParseConfigFromFolder() output = %v, want %v", got, wantOutput)
}
})
Expand Down

0 comments on commit 1b7f992

Please sign in to comment.