Skip to content

Commit

Permalink
platform/golang: loosen assertion for Go 1.16.2 (#2480)
Browse files Browse the repository at this point in the history
The error messages for commands executed outside of a module were
changed in Go 1.16.2. This change loosens our assertion to handle the
old and new messages.

Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
  • Loading branch information
sykesm authored and manish-sethi committed Aug 31, 2021
1 parent c5c1acc commit 0ebd9cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/chaincode/platforms/golang/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@ func Test_listModuleInfoFailure(t *testing.T) {
require.NoError(t, err, "failed to change to temporary directory")

_, err = listModuleInfo()
require.EqualError(t, err, "'go list' failed with: go: cannot find main module; see 'go help modules': exit status 1")
require.ErrorContains(t, err, "'go list' failed with: go: ")
require.ErrorContains(t, err, "see 'go help modules': exit status 1")
}

0 comments on commit 0ebd9cf

Please sign in to comment.