mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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.
This commit is contained in:
parent
3bb7acc8cf
commit
24d2a9da70
12
test.sh
12
test.sh
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user