diff options
author | 2020-08-13 14:43:49 +0200 | |
---|---|---|
committer | 2020-08-26 12:54:50 +0200 | |
commit | 764e0a41bd0fa062ff32287c53645fcbb650697e (patch) | |
tree | 1bb0e9c48a4451e0298da90cfee3f2b71cd55561 /tests/oom-platform-cert-service/truststoremerger/resources | |
parent | 656f0c5fb085d10f25389c4422186cc107bcf5a7 (diff) |
Add CSITs for Truststore Merger
Issue-ID: DCAEGEN2-2253
Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com>
Change-Id: Ie2d648108c99f4a1e61fe855f318078e6ffc0e21
Diffstat (limited to 'tests/oom-platform-cert-service/truststoremerger/resources')
-rw-r--r-- | tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot | 34 | ||||
-rw-r--r-- | tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-properties.robot | 35 |
2 files changed, 69 insertions, 0 deletions
diff --git a/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot new file mode 100644 index 00000000..1040afab --- /dev/null +++ b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-keywords.robot @@ -0,0 +1,34 @@ +*** Settings *** + +Resource ../../../common.robot +Resource ./trust-merger-properties.robot +Library ../libraries/TrustMergerManager.py ${MOUNT_PATH} ${TRUSTSTORES_PATH} +Library ../libraries/JksTruststoreValidator.py +Library ../libraries/PemTruststoreValidator.py + +*** Keywords *** + +Run Trust Merger And Expect Error + [Documentation] Run Truststore Merger Container And Validate Exit Code + [Arguments] ${env_file} ${expected_exit_code} + ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file} + Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} negative_path + Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code} + +Run Trust Merger And Merge Truststore Files To Jks + [Documentation] Run Truststore Merger Container And Validate Exit Code And Files + [Arguments] ${env_file} ${expected_exit_code} ${jks_path} ${jks_password} ${expected_jks_path} + ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file} + ${files_equal}= Assert Jks Truststores Equal ${jks_path} ${jks_password} ${expected_jks_path} + Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} positive_path + Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code} + Should Be True ${files_equal} + +Run Trust Merger And Merge Truststore Files To Pem + [Documentation] Run Truststore Merger Container And Validate Exit Code And Files + [Arguments] ${env_file} ${expected_exit_code} ${pem_path} ${expected_pem_path} + ${exit_code}= Run Merger Container ${DOCKER_MERGER_IMAGE} ${MERGER_CONTAINER_NAME} ${env_file} + ${files_equal}= Assert Pem Truststores Equal ${pem_path} ${expected_pem_path} + Remove Merger Container And Save Logs ${MERGER_CONTAINER_NAME} positive_path + Should Be Equal As Strings ${exit_code} ${expected_exit_code} Client return unexpected exit code return: ${exitcode} , but expected: ${expected_exit_code} + Should Be True ${files_equal} diff --git a/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-properties.robot b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-properties.robot new file mode 100644 index 00000000..d356f604 --- /dev/null +++ b/tests/oom-platform-cert-service/truststoremerger/resources/trust-merger-properties.robot @@ -0,0 +1,35 @@ +*** Variables *** + +${DOCKER_MERGER_IMAGE} nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-truststore-merger:latest +${MERGER_CONTAINER_NAME} %{MergerContainerName} +${MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp +${TRUSTSTORES_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores +${EXPECTED_TRUSTSTORES_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores + +${JKS_TRUSTSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststore.jks +${JKS_PASSWORD_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststoreJks.pass +${P12_TRUSTSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststore.p12 +${P12_PASSWORD_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststoreP12.pass +${PEM_TRUSTSTORE_MOUNT_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/tmp/truststore.pem + +${JKS_TRUSTSTORE_EXPECTED_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/jksAndPemAndP12.jks +${PEM_TRUSTSTORE_EXPECTED_PATH} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/expected_truststores/pemAndP12.pem + +${INVALID_ENV_EMPTY_FILE} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_file.env +${INVALID_ENV_LIST_SIZE} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_different_lists_size.env +${INVALID_ENV_EMPTY_PASSWORDS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_passwords.env +${INVALID_PASSWORD_PATHS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_password_path.env +${INVALID_ENV_TRUSTSTORE_PATHS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_truststore_paths.env +${INVALID_ENV_FILE_PASSWORD} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_file_password_pair.env +${INVALID_ENV_EXTENSION} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_extension.env +${INVALID_ENV_DUPLICATED_ALIASES} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_duplicated_aliases.env +${INVALID_ENV_EMPTY_CERTS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/invalid_empty_certs.env +${VALID_ENV_JKS_PEM_P12} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_jks_pem_p12.env +${VALID_ENV_PEM_P12} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_pem_p12.env +${VALID_ENV_SINGLE_TRUSTSTORE} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/valid_single_truststore.env + +${TRUSTSTORE_JKS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.jks +${TRUSTSTORE_JKS_PASS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststoreJks.pass +${TRUSTSTORE_P12} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.p12 +${TRUSTSTORE_P12_PASS} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pass +${TRUSTSTORE_PEM} %{WORKSPACE}/tests/oom-platform-cert-service/truststoremerger/assets/truststores/truststore.pem |