Skip to content

Commit

Permalink
ci: Run the Parsec Service when testing
Browse files Browse the repository at this point in the history
With the new addition of the Parsec Basic Client for the Parsec
Provider Context, we now need to run the Parsec Service in order
to create the client and use it for testing.

Signed-off-by: Tomás González <[email protected]>
  • Loading branch information
tgonzalezorlandoarm committed Mar 4, 2024
1 parent afe6782 commit 21b99f8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
19 changes: 18 additions & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,25 @@ set -ex
echo "OpenSSL version being used:"
openssl version

wait_for_service() {
while [ -z "$(pgrep parsec)" ]; do
sleep 1
done

sleep 5

# Check that Parsec successfully started and is running
pgrep parsec >/dev/null
}

pushd /tmp/parsec
./target/debug/parsec -c e2e_tests/provider_cfg/mbed-crypto/config.toml &
popd

wait_for_service

# Build parsec provider shared library
pushd parsec-openssl-provider-shared/ &&
pushd parsec-openssl-provider-shared
cargo build
popd

Expand Down
4 changes: 4 additions & 0 deletions tests/docker_image/parsec-openssl-provider-test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ ENV PATH="/root/.cargo/bin:/opt/rust/bin:${PATH}"

# For running tests Parsec is configured with the socket in /tmp/
ENV PARSEC_SERVICE_ENDPOINT="unix:/tmp/parsec.sock"

RUN git clone https://github.com/parallaxsecond/parsec.git --branch 1.3.0 \
&& cd parsec \
&& cargo build --features "mbed-crypto-provider,direct-authenticator"

0 comments on commit 21b99f8

Please sign in to comment.