diff --git a/e2e/seed.sh b/e2e/seed.sh index d604cbefa..6af35703b 100755 --- a/e2e/seed.sh +++ b/e2e/seed.sh @@ -13,12 +13,11 @@ post() { curl -fsS -X POST "$base$1" "${H[@]}" -d "$2"; } # jq-free JSON reads: py EXPR, with the parsed body as d. py() { python3 -c "import sys, json; d = json.load(sys.stdin); print($1)"; } -# Repository policy. archied reads policies only at boot, so restart it. +# Repository policy. archied applies it live; the pause lets the watch publish it. if ! get /api/control-plane/resources/repository-policies | grep -q '"widgets"'; then version=$(get /api/control-plane/resources/repository-policies | py 'd["resource"]["version"]') post /api/control-plane/resources/repository-policies/commands/replace \ "{\"value\":[{\"owner\":\"acme\",\"name\":\"widgets\",\"base\":\"main\"}],\"expected_version\":$version}" >/dev/null - "$here/stack.sh" restart archied sleep 5 fi