Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
miyazakh committed Jun 21, 2024
1 parent 30eb558 commit ac5b81e
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions scripts/ocsp-stapling.test
Original file line number Diff line number Diff line change
Expand Up @@ -388,19 +388,8 @@ else
echo 'skipping TLS1.3 stapling tests.' 1>&2
fi

printf '%s\n\n' "------------- TEST CASE 1 SHOULD PASS ------------------------"
# client test against our own server - GOOD CERT
./examples/server/server -c certs/ocsp/server1-cert.pem -R "$ready_file2" \
-k certs/ocsp/server1-key.pem -p $port3 &
wolf_pid3=$!
wait_for_readyFile "$ready_file2" $wolf_pid3 $port3
./examples/client/client -C -A certs/ocsp/root-ca-cert.pem -W 1 -p $port3
RESULT=$?
[ $RESULT -ne 0 ] && printf '\n\n%s\n' "Client connection 1 failed" && exit 1
printf '%s\n\n' "Test PASSED!"

# DTLS 1.2 and 1.3 cases
if ./examples/client/client -? 2>&1 | grep -q 'DTLS'; then
if ./examples/client/client -? 2>&1 | grep -q 'DTLSv1.2'; then
printf '%s\n\n' "------------- TEST CASE DTLS-1 SHOULD PASS -------------------"
# client test against our own server, must staple - GOOD CERT
echo $ready_file2
Expand All @@ -415,7 +404,9 @@ if ./examples/client/client -? 2>&1 | grep -q 'DTLS'; then
RESULT=$?
[ $RESULT -ne 0 ] && printf '\n\n%s\n' "Client connection 5 failed" && exit 1
printf '%s\n\n' "Test PASSED!"
fi

if ./examples/client/client -? 2>&1 | grep -q 'DTLSv1.3'; then
printf '%s\n\n' "------------- TEST CASE DTLS-2 SHOULD PASS -------------------"
# client test against our own server, must staple - GOOD CERT
./examples/server/server -c certs/ocsp/server1-cert.pem -R "$ready_file2" \
Expand Down

0 comments on commit ac5b81e

Please sign in to comment.