From 1b7f9926566cbc009aaf28cf5ef06a1b481842b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gerdau?= Date: Tue, 27 Oct 2020 00:45:09 +0100 Subject: [PATCH] test: forward-fix test 'json config found, but borked' for go 1.16 --- internal/config_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/config_test.go b/internal/config_test.go index b9a4f30..5dc045f 100644 --- a/internal/config_test.go +++ b/internal/config_test.go @@ -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) } })