Skip to content

Commit f2e31ee

Browse files
Assume certs are always located
in the same relative location to the test configuration path
1 parent 8e3c937 commit f2e31ee

File tree

7 files changed

+14
-12
lines changed

7 files changed

+14
-12
lines changed

selenium/.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ test/oauth/*/h2/*.trace.db
88
test/oauth/*/h2/*.lock.db
99
*/target/*
1010
tls-gen
11-
test/oauth/*/*.pem
12-
test/oauth/*/*.p12
13-
test/authnz-msg-protocols/certs
11+
test/*/certs/*.pem
12+
test/*/certs/*.p12
13+
test/*/certs/*.jks
14+
test/*/*/*.pem
15+
test/*/*/*.p12
16+
test/*/*/*.jks

selenium/bin/suite_template

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,11 @@ _test() {
333333
--env SELENIUM_POLLING=${SELENIUM_POLLING} \
334334
--env PROFILES="${PROFILES}" \
335335
--env ENV_FILE="/code/.env" \
336+
--env RABBITMQ_CERTS=/etc/rabbitmq/certs \
336337
--env NODE_EXTRA_CA_CERTS=/nodejs/ca.pem \
337338
-v ${MOUNT_NODE_EXTRA_CA_CERTS}:/nodejs/ca.pem \
338339
-v ${TEST_DIR}:/code/test \
339-
-v ${SCRIPT}/../../../${RABBITMQ_LOCAL_CERTS}:${RABBITMQ_CERTS} \
340+
-v ${SELENIUM_ROOT_FOLDER}/${TEST_CONFIG_PATH}/certs:/etc/rabbitmq/certs \
340341
-v ${SCREENS}:/screens \
341342
-v ${ENV_FILE}:/code/.env \
342343
mocha-test:${mocha_test_tag} test /code/test${TEST_CASES_PATH}
@@ -372,8 +373,9 @@ profiles_with_local_or_docker() {
372373
generate_env_file() {
373374
begin "Generating env file ..."
374375
mkdir -p $CONF_DIR
375-
${BIN_DIR}/gen-env-file $TEST_CONFIG_DIR $ENV_FILE
376+
${BIN_DIR}/gen-env-file $TEST_CONFIG_DIR $ENV_FILE
376377
source $ENV_FILE
378+
echo "export TEST_CONFIG_PATH=${TEST_CONFIG_PATH}" >> $ENV_FILE
377379
end "Finished generating env file."
378380
}
379381
generate-ca-server-client-kpi() {
@@ -584,7 +586,7 @@ test_local() {
584586
export RABBITMQ_AMQP_PASSWORD=${RABBITMQ_AMQP_PASSWORD}
585587
export SELENIUM_TIMEOUT=${SELENIUM_TIMEOUT:-20000}
586588
export SELENIUM_POLLING=${SELENIUM_POLLING:-500}
587-
589+
588590
print "> SELENIUM_TIMEOUT: ${SELENIUM_TIMEOUT}"
589591
print "> SELENIUM_POLLING: ${SELENIUM_POLLING}"
590592
print "> RABBITMQ_HOST: ${RABBITMQ_HOST}"

selenium/test/authnz-msg-protocols/env.docker

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
export IMPORT_DIR=selenium/test/authnz-msg-protocols/imports
2-
export RABBITMQ_LOCAL_CERTS=selenium/test/authnz-msg-protocols/certs
3-
export RABBITMQ_CERTS=$RABBITMQ_LOCAL_CERTS

selenium/test/authnz-msg-protocols/rabbitmq.auth-mtls.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ auth_mechanisms.1 = EXTERNAL
33

44
ssl_cert_login_from = subject_alternative_name
55
ssl_cert_login_san_type = dns
6-
ssl_cert_login_san_index = 1
6+
ssl_cert_login_san_index = 1
77
ssl_options.verify = verify_peer
88
ssl_options.fail_if_no_peer_cert = true
99

selenium/test/env.docker

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ export RABBITMQ_SCHEME=http
22
export RABBITMQ_HOSTNAME=rabbitmq
33
export RABBITMQ_HOST=rabbitmq:15672
44
export IMPORT_DIR=/var/rabbitmq/imports
5+
export RABBITMQ_CERTS=/etc/rabbitmq/certs

selenium/test/env.local

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export RABBITMQ_SCHEME=http
22
export RABBITMQ_HOSTNAME=localhost
33
export RABBITMQ_HOST=localhost:15672
4+
export RABBITMQ_CERTS=selenium/test/${TEST_CONFIG_PATH}

0 commit comments

Comments
 (0)