Skip to content

Commit

Permalink
Add foolproof protections to ensure test scripts are not used standal…
Browse files Browse the repository at this point in the history
…one (#715)
  • Loading branch information
lsh123 authored Oct 30, 2023
1 parent 9b08217 commit 641b8f4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testDSig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# This script needs to be called from testrun.sh script
#

# ensure this script is called from testrun.sh
if [ -z "$xmlsec_app" -o -z "$crypto_config_folder" ]; then
echo "This script needs to be called from testrun.sh script"
exit 1
fi

# Setup URL to files mapping for offline testing, if tests are run against online
# then some tests might fail.
if [ -z "$XMLSEC_TEST_ONLINE" ]; then
Expand Down
7 changes: 7 additions & 0 deletions tests/testEnc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
# This script needs to be called from testrun.sh script
#


# ensure this script is called from testrun.sh
if [ -z "$xmlsec_app" -o -z "$crypto_config_folder" ]; then
echo "This script needs to be called from testrun.sh script"
exit 1
fi

##########################################################################
##########################################################################
##########################################################################
Expand Down
6 changes: 6 additions & 0 deletions tests/testKeys.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# This script needs to be called from testrun.sh script
#

# ensure this script is called from testrun.sh
if [ -z "$xmlsec_app" -o -z "$crypto_config_folder" ]; then
echo "This script needs to be called from testrun.sh script"
exit 1
fi

##########################################################################
##########################################################################
##########################################################################
Expand Down

0 comments on commit 641b8f4

Please sign in to comment.