Skip to content

Commit

Permalink
Resources: Update test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
aveenismail committed Feb 25, 2025
1 parent 5e7b8da commit 62f274b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 23 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -476,4 +476,3 @@ jobs:
if [ -n "$DEFAULT_CONNECTOR_URL" ]; then
curl -s http://localhost:12345/dispatcher/release?connector=$DEFAULT_CONNECTOR_URL
fi
8 changes: 4 additions & 4 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Run Integration Tests

on:
schedule:
# Run this every wednesday at 3:40. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: '40 3 * * 3'
on: [push, pull_request]
# schedule:
# # Run this every wednesday at 3:40. https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
# - cron: '40 3 * * 3'

jobs:
main:
Expand Down
24 changes: 9 additions & 15 deletions resources/tests/bash/cmdline_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ echo "********************************************************** "
./test_eckey.sh "$BIN"
./test_rsakey.sh "$BIN"

echo "********************************************************** "
echo " Asymmetric Keys"
echo "********************************************************** "
./test_edkey.sh "$BIN"
if [ -z ${DOCKER_IMAGE} ] || [ ${DOCKER_IMAGE} != "centos:7" ]; then
# This DOCKER_IMAGE environment variable is set in the build_and_test.yml github workflow.
./test_eckey.sh "$BIN"
fi
./test_rsakey.sh "$BIN"
#echo "********************************************************** "
#echo " Asymmetric Keys"
#echo "********************************************************** "
#./test_edkey.sh "$BIN"
#if [ -z ${DOCKER_IMAGE} ] || [ ${DOCKER_IMAGE} != "centos:7" ]; then
# # This DOCKER_IMAGE environment variable is set in the build_and_test.yml github workflow.
# ./test_eckey.sh "$BIN"
#fi
#./test_rsakey.sh "$BIN"

echo "********************************************************** "
echo " HMAC Keys"
Expand Down Expand Up @@ -133,16 +133,10 @@ test "$BIN -p password -a delete-object -i $id -t template" " Delete template"
rm resp.txt
rm template.txt

<<<<<<< HEAD
echo "********************************************************** "
echo " Wrap Keys"
echo "********************************************************** "
./test_wrapkey.sh "$BIN"
=======
#echo "********************************************************** "
#echo " Wrap Keys"
#echo "********************************************************** "
>>>>>>> 6e8ed4f (Improve testing scripts)

echo "********************************************************** "
echo " List Objects"
Expand Down
4 changes: 2 additions & 2 deletions resources/tests/bash/opensc_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ MODULE=$1
set -e

echo "******************* Generation Tests ********************* "
pkcs11-tool --module $MODULE --login --pin 0001password --keypairgen --id 100 --key-type EC:secp384r1
pkcs11-tool --module $MODULE --login --pin 0001password --keypairgen --id 1 --key-type EC:secp384r1
pkcs11-tool --module $MODULE --login --pin 0001password --keypairgen --id 2 --key-type EC:prime256v1
pkcs11-tool --module $MODULE --login --pin 0001password --keypairgen --id 4 --key-type rsa:2048 --usage-sign
pkcs11-tool --module $MODULE --login --pin 0001password --keypairgen --id 5 --key-type rsa:3072 --usage-sign

echo "******************* Signing Tests ********************* "
echo "this is test data" > data.txt
pkcs11-tool --module $MODULE --sign --pin 0001password --id 100 -m ECDSA-SHA1 --signature-format openssl -i data.txt -o data.sig
pkcs11-tool --module $MODULE --sign --pin 0001password --id 1 -m ECDSA-SHA1 --signature-format openssl -i data.txt -o data.sig
pkcs11-tool --module $MODULE --sign --pin 0001password --id 2 -m ECDSA-SHA1 --signature-format openssl -i data.txt -o data.sig
pkcs11-tool --module $MODULE --sign --pin 0001password --id 4 -m SHA512-RSA-PKCS -i data.txt -o data.sig
pkcs11-tool --module $MODULE --sign --pin 0001password --id 5 -m SHA512-RSA-PKCS -i data.txt -o data.sig
Expand Down
2 changes: 1 addition & 1 deletion resources/tests/bash/test_eckey.sh
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ is_fedora=$?
cat /etc/os-release | grep 'CentOS Linux 7'
is_centos7=$?
set -e
if [ $is_fedora -ne 0 ] && [ $is_centos -ne 0 ]; then
if [ $is_fedora -ne 0 ]; then
echo "------------- Brainpool256"
echo "Generate key:"
test_with_resp "$BIN -p password -a generate-asymmetric-key -i 0 -l ecKey -d 5,8,13 -c sign-ecdsa,derive-ecdh,sign-attestation-certificate -A ecbp256" " Generate key"
Expand Down

0 comments on commit 62f274b

Please sign in to comment.