test.sh: Turn off enforcement for minimal go.sum.
It seems that generated go.sum differs between different go versions.
This was introducing noise in the tests.
@@ -646,7 +646,7 @@ function mod_tidy_for_module {
# Watch for upstream solution: https://github.com/golang/go/issues/27005
local tmpModDir
tmpModDir=$(mktemp -d -t 'tmpModDir.XXXXXX')
- run cp "./go.mod" "./go.sum" "${tmpModDir}" || return 2
+ run cp "./go.mod" "${tmpModDir}" || return 2
# Guarantees keeping go.sum minimal
# If this is causing too much problems, we should
@@ -659,23 +659,13 @@ function mod_tidy_for_module {
diff -C 5 "${tmpModDir}/go.mod" "./go.mod"
tmpFileGoModInSync="$?"
- local tmpFileGoSumInSync
- diff -C 5 "${tmpModDir}/go.sum" "./go.sum"
- tmpFileGoSumInSync="$?"
- set -e
-
# Bring back initial state
mv "${tmpModDir}/go.mod" "./go.mod"
- mv "${tmpModDir}/go.sum" "./go.sum"
if [ "${tmpFileGoModInSync}" -ne 0 ]; then
log_error "${PWD}/go.mod is not in sync with 'go mod tidy'"
return 255
fi
- if [ "${tmpFileGoSumInSync}" -ne 0 ]; then
- log_error "${PWD}/go.sum is not in sync with 'rm go.sum; go mod tidy'"
- return 255
- fi
}
function mod_tidy_pass {
