Skip to content

Commit

Permalink
platform/golang: loosen assertion for Go 1.16.2 (release-2.2)
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 ba2a9f1 commit e6a6a61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/chaincode/platforms/golang/list_test.go
Expand Up @@ -123,5 +123,6 @@ func Test_listModuleInfoFailure(t *testing.T) {
require.NoError(t, err, "failed to change to temporary directory")

_, err = listModuleInfo()
assert.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 e6a6a61

Please sign in to comment.