diff --git a/core/chaincode/platforms/golang/list_test.go b/core/chaincode/platforms/golang/list_test.go index 5ea0cfbbbca..a76c9d26c39 100644 --- a/core/chaincode/platforms/golang/list_test.go +++ b/core/chaincode/platforms/golang/list_test.go @@ -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") }