From 3e7b63bff2e111d36d3532c382bb1d8631ccf75d Mon Sep 17 00:00:00 2001 From: Philipp Winter Date: Tue, 26 May 2026 19:45:43 -0500 Subject: [PATCH] Fix in-enclave unit tests. I noticed that code rot resulted in the in-enclave unit tests failing. The run-unit-tests.sh file ended up being empty, which resulted in the enclave terminating right away. This PR makes the Dockerfile explicitly copy the file, and it bumps memory limits. --- Makefile | 6 +++--- docker/Dockerfile-unit-test | 14 ++------------ docker/run-unit-tests.sh | 12 ++++++++++++ 3 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 docker/run-unit-tests.sh diff --git a/Makefile b/Makefile index 1134b8c..a2ca6e8 100644 --- a/Makefile +++ b/Makefile @@ -55,9 +55,9 @@ enclave: $(godeps) $(image_eif) terminate --enclave-name veil \ --eif-path $(image_eif) \ --cpu-count 2 \ - --memory 3850 + --memory 4096 -$(image_test_tar): $(godeps) $(image_test_dockerfile) +$(image_test_tar): $(godeps) $(image_test_dockerfile) docker/run-unit-tests.sh @echo "Building $(image_test_tar)..." @docker run --volume $(PWD):/workspace \ gcr.io/kaniko-project/executor:v1.9.2 \ @@ -84,7 +84,7 @@ enclave-test: $(godeps) $(image_test_eif) terminate --eif-path $(image_test_eif) \ --attach-console \ --cpu-count 2 \ - --memory 3850 + --memory 4096 .PHONY: terminate terminate: diff --git a/docker/Dockerfile-unit-test b/docker/Dockerfile-unit-test index 76f627c..da48be6 100644 --- a/docker/Dockerfile-unit-test +++ b/docker/Dockerfile-unit-test @@ -7,18 +7,8 @@ COPY cmd/ ./cmd/ COPY internal/ ./internal/ COPY vendor/ ./vendor/ COPY Makefile go.mod go.sum ./ -RUN cat > ./run-unit-tests.sh <