Skip to content

Commit 16df6a4

Browse files
committed
e2e: verify all 4 cert files before generating
Instead of only checking for ca.crt, verify that all generated certs exist on disk before running gen-certs.sh. This prevents a subtle failure where one missing cert causes TLS handshake errors during tests. Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>
1 parent f1b1803 commit 16df6a4

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

  • scripts/test/e2e

scripts/test/e2e/run

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ setup() {
3030
# The certs are baked into the tlsregistry and engine container images,
3131
# so they must exist on disk before docker compose up --build.
3232
# gen-certs.sh handles its own directory navigation.
33-
if [ ! -f e2e/testdata/registry/certs/ca.crt ]; then
33+
certdir=e2e/testdata/registry/certs
34+
missing=0
35+
for f in ca.crt ca.key tlsregistry.crt tlsregistry.key; do
36+
if [ ! -f "${certdir}/${f}" ]; then
37+
missing=1
38+
break
39+
fi
40+
done
41+
if [ "$missing" -eq 1 ]; then
3442
sh e2e/testdata/registry/certs/gen-certs.sh
3543
fi
3644

0 commit comments

Comments
 (0)