Fix test-mods to allow for pinning version from k8s.io

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2022-11-02 23:43:03 +00:00 committed by Brad Davidson
parent 87c7ea81f0
commit dd2f652618
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -e -x
res=$(go mod edit --json | jq '.Replace[] | select(.Old.Path | contains("k8s.io/")) | .New.Path' | grep -v k3s-io | wc -l)
res=$(go mod edit --json | jq -r '.Replace[] | select(.Old.Path | contains("k8s.io/")) | .New.Path' | grep -vE '^(k8s.io/|github.com/k3s-io/)' | wc -l)
if [ $res -gt 0 ];then
echo "Incorrect kubernetes replacement fork in go.mod"
exit 1