go.sum: Update & make sure PASSES="mod_tidy" ./test detects such problems.

Commit inspired by this failure:
  https://travis-ci.com/github/etcd-io/etcd/jobs/391164537

This is not happanning locally - but can be forced by removal of go.sum
file. Let's watch how frequently we will need to refresh go.sum.
This commit is contained in:
Piotr Tabor
2020-09-26 15:25:15 +02:00
parent f1d4593241
commit b3bbe10465
2 changed files with 4 additions and 1 deletions

4
test
View File

@@ -547,6 +547,10 @@ function mod_tidy_pass {
tmpModDir=$(mktemp -d --suffix "etcd-mod")
cp "./go.mod" "./go.sum" "${tmpModDir}"
# Guarantees keeping go.sum minimal
# If this is causing too much problems, we should
# stop controlling go.sum at all.
rm go.sum
go mod tidy
set +e