Skip to content

Commit

Permalink
tests/screentest: pin screentest binary to older version
Browse files Browse the repository at this point in the history
The screentest binary (golang.org/x/website/cmd/screentest) was
recently updated to use a new version of chromedp, the package that
talks to chrome in order to obtain screenshots. The new version
produces slightly different screenshots. We will eventually deal
with this when the screentest changes are finished, but for now
use an older screentest version.

Change-Id: I197501241a823f7c7ee03fab9c7312f89949af9a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/627535
kokoro-CI: kokoro <[email protected]>
Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
jba committed Nov 13, 2024
1 parent 2edb6b8 commit de75df5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/screentest/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ set -e

source devtools/lib.sh || { echo "Are you at repo root?"; exit 1; }

screentest_version=v0.0.0-20241108174919-3a761022ad6f

# This should match the version we are using in devtools/docker/compose.yaml.
chromedp_version=97.0.4692.71

Expand Down Expand Up @@ -131,7 +133,7 @@ main() {
dcompose up --detach chromedp
dcompose up --detach --force-recreate frontend
dcompose run --rm --entrypoint bash go -c "
go install golang.org/x/website/cmd/screentest@latest
go install golang.org/x/website/cmd/screentest@$screentest_version
go run ./devtools/cmd/wait_available --timeout 120s frontend:8080 -- \
$(echo $cmd)"
elif [ "$env" = local ]; then
Expand All @@ -141,13 +143,13 @@ main() {
timeout 3s bash -c -- 'while ! nc -z localhost 9222; do sleep 1; done'
fi
if ! command -v screentest &> /dev/null; then
runcmd go install golang.org/x/website/cmd/screentest@latest
runcmd go install golang.org/x/website/cmd/screentest@$screentest_version
fi
runcmd $cmd
else
dcompose up --detach chromedp
dcompose run --rm --entrypoint bash go -c "
go install golang.org/x/website/cmd/screentest@latest
go install golang.org/x/website/cmd/screentest@$screentest_version
$(echo $cmd)"
fi
}
Expand Down

0 comments on commit de75df5

Please sign in to comment.