blob: 966a42432d69c54142be305366c45811a1cd2804 [file] [log] [blame]
Joanna Jeremicz764e0a42020-08-13 14:43:49 +02001*** Settings ***
2
3Documentation Truststore merger test case scenarios
4Library RequestsLibrary
5Resource ./resources/trust-merger-keywords.robot
6
7*** Test Cases ***
8
9Trust Merger fails when file extension is invalid
10 [Tags] OOM-TRUST-STORE-MERGER
11 [Documentation] Run with invalid truststore extension env and expect error code
12 Run Trust Merger And Expect Error ${INVALID_ENV_EXTENSION} 1
13
14Trust Merger fails when truststore and passwords envs not provided
15 [Tags] OOM-TRUST-STORE-MERGER
16 [Documentation] Run with invalid empty envs and expect error code
17 Run Trust Merger And Expect Error ${INVALID_ENV_EMPTY_FILE} 1
18
19Trust Merger fails when list sizes are different
20 [Tags] OOM-TRUST-STORE-MERGER
21 [Documentation] Run with different truststore and password envs size and expect error code
22 Run Trust Merger And Expect Error ${INVALID_ENV_LIST_SIZE} 2
23
24Trust Merger fails when a variable is empty
25 [Tags] OOM-TRUST-STORE-MERGER
26 [Documentation] Run with empty truststore password path env and expect error code
27 Run Trust Merger And Expect Error ${INVALID_ENV_EMPTY_PASSWORDS} 2
28
29Trust Merger fails when truststore paths are invalid
30 [Tags] OOM-TRUST-STORE-MERGER
31 [Documentation] Run with invalid truststore path and expect error code
32 Run Trust Merger And Expect Error ${INVALID_ENV_TRUSTSTORE_PATHS} 3
33
34Trust Merger fails when password path is invalid
35 [Tags] OOM-TRUST-STORE-MERGER
36 [Documentation] Run with invalid password path and expect error code
37 Run Trust Merger And Expect Error ${INVALID_PASSWORD_PATHS} 4
38
39Trust Merger fails when password file pair is invalid
40 [Tags] OOM-TRUST-STORE-MERGER
41 [Documentation] Run with incorrect password env and expect error code
42 Run Trust Merger And Expect Error ${INVALID_ENV_FILE_PASSWORD} 7
43
44Trust Merger fails when pem does not contain cert
45 [Tags] OOM-TRUST-STORE-MERGER
46 [Documentation] Run with empty pem truststore and expect error code
47 Run Trust Merger And Expect Error ${INVALID_ENV_EMPTY_CERTS} 9
48
49Trust Merger fails when aliases are duplicated
50 [Tags] OOM-TRUST-STORE-MERGER
51 [Documentation] Run with duplicated aliases in truststores and expect error code
52 Run Trust Merger And Expect Error ${INVALID_ENV_DUPLICATED_ALIASES} 10
53
54Trust Merger merges successfully jks pem p12
55 [Tags] OOM-TRUST-STORE-MERGER
56 [Documentation] Run with valid env file and expect merged certs from jks, pem and p12
57 Run Trust Merger And Merge Truststore Files To Jks ${VALID_ENV_JKS_PEM_P12} 0 ${JKS_TRUSTSTORE_MOUNT_PATH} ${TRUSTSTORE_JKS_PASS} ${JKS_TRUSTSTORE_EXPECTED_PATH}
58
59Trust Merger merges successfully pem p12
60 [Tags] OOM-TRUST-STORE-MERGER
61 [Documentation] Run with valid env file and expect merged certs from pem and p12
62 Run Trust Merger And Merge Truststore Files To Pem ${VALID_ENV_PEM_P12} 0 ${PEM_TRUSTSTORE_MOUNT_PATH} ${PEM_TRUSTSTORE_EXPECTED_PATH}
63
64Trust Merger ends successfully with single truststore
65 [Tags] OOM-TRUST-STORE-MERGER
66 [Documentation] Run with one truststore in env file and expect code 0
67 Run Trust Merger And Merge Truststore Files To Jks ${VALID_ENV_SINGLE_TRUSTSTORE} 0 ${JKS_TRUSTSTORE_MOUNT_PATH} ${TRUSTSTORE_JKS_PASS} ${TRUSTSTORE_JKS}