Skip to content

Commit

Permalink
Added two test for the new command line option --security-level
Browse files Browse the repository at this point in the history
  • Loading branch information
matteocorti committed Jan 16, 2023
1 parent 3300baf commit 6bd74a5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,20 @@ testRootCertNotInChainGoogle() {
assertEquals "wrong exit code" "${NOT_OK}" "${EXIT_CODE}"
}

testNoSecurityLevelWrongProtocol() {
# shellcheck disable=SC2086
${SCRIPT} ${TEST_DEBUG} --host imap.cern.ch --port 993
EXIT_CODE=$?
assertEquals "wrong exit code" "${NAGIOS_CRITICAL}" "${EXIT_CODE}"
}

testSecurityLevel0WrongProtocol() {
# shellcheck disable=SC2086
${SCRIPT} ${TEST_DEBUG} --host imap.cern.ch --port 993 --security-level 0
EXIT_CODE=$?
assertEquals "wrong exit code" "${NAGIOS_OK}" "${EXIT_CODE}"
}

testJavaKeyStore1() {
# shellcheck disable=SC2086
${SCRIPT} ${TEST_DEBUG} --file ./keystore.jks --password changeit --jks-alias google-com --ignore-incomplete-chain --ignore-exp
Expand Down

0 comments on commit 6bd74a5

Please sign in to comment.