Skip to content

Commit 04e5a83

Browse files
authored
test-images: check contents of version.txt (#1660)
Document expected contents of `version.txt` and allow future changes to be detected by a failing test.
1 parent 541506a commit 04e5a83

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test-images.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ docker compose build
4949
log "Starting containers..."
5050
docker compose up --detach
5151

52+
log "Verifying version.txt..."
53+
diff \
54+
<(docker compose exec nginx cat /usr/share/nginx/html/version.txt) \
55+
<(cat <<EOF
56+
versions:
57+
$(git rev-parse HEAD) ($(git describe --tags))
58+
$(cd client && git rev-parse HEAD) client ($(cd client && git describe --tags))
59+
$(cd server && git rev-parse HEAD) server ($(cd server && git describe --tags))
60+
EOF
61+
)
62+
log "version.txt looks OK."
63+
5264
log "Verifying frontend..."
5365
check_path 180 / 'ODK Central'
5466
log " Frontend started OK."

0 commit comments

Comments
 (0)