Skip to content

Commit

Permalink
podman->docker
Browse files Browse the repository at this point in the history
  • Loading branch information
steebchen committed Sep 3, 2024
1 parent ecc2926 commit d5d7b08
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scripts/e2e_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
set -eux
IMAGE_NAME="http-prover-test"
# Check if the image already exists
podman build -t $IMAGE_NAME .
if podman images | grep -q "$IMAGE_NAME"; then
docker build -t $IMAGE_NAME .
if docker images | grep -q "$IMAGE_NAME"; then
echo "Image $IMAGE_NAME already exists. Skipping build step."
else
echo "Image $IMAGE_NAME does not exist. Building the image..."
podman build -t $IMAGE_NAME .
docker build -t $IMAGE_NAME .
if [ $? -ne 0 ]; then
echo "Failed to build the image. Exiting."
exit 1
Expand All @@ -25,14 +25,15 @@ KEYGEN_OUTPUT=$(cargo run -p keygen)
ADMIN_PUBLIC_KEY=$(echo "$KEYGEN_OUTPUT" | grep "Public key" | awk '{print $3}' | tr -d ',' | tr -d '[:space:]')
ADMIN_PRIVATE_KEY=$(echo "$KEYGEN_OUTPUT" | grep "Private key" | awk '{print $3}' | tr -d ',' | tr -d '[:space:]')

podman run -d --replace --name http_prover_test \
docker run -d --name http_prover_test \
-p 3040:3000 $IMAGE_NAME \
--jwt-secret-key "secret" \
--message-expiration-time 3600 \
--session-expiration-time 3600 \
--authorized-keys $PUBLIC_KEY,$ADMIN_PUBLIC_KEY \
--admin-key $ADMIN_PUBLIC_KEY
--admin-key $ADMIN_PUBLIC_KEY

PRIVATE_KEY=$PRIVATE_KEY PROVER_URL="http://localhost:3040" ADMIN_PRIVATE_KEY=$ADMIN_PRIVATE_KEY cargo test --no-fail-fast --workspace --verbose

podman stop http_prover_test
docker stop http_prover_test
docker rm http_prover_test

0 comments on commit d5d7b08

Please sign in to comment.