diff --git a/tests/run.yml b/tests/run.yml index e2c66f8b5d..208e85bc36 100644 --- a/tests/run.yml +++ b/tests/run.yml @@ -521,6 +521,8 @@ cmd: test-prometheus-efk.sh executable: /bin/bash chdir: "{{ kolla_ansible_src_dir }}" + environment: + TLS_ENABLED: "{{ tls_enabled }}" when: scenario == "prometheus-efk" - name: Run test-venus.sh script diff --git a/tests/test-prometheus-efk.sh b/tests/test-prometheus-efk.sh index 86406223ad..436b2b8d5a 100755 --- a/tests/test-prometheus-efk.sh +++ b/tests/test-prometheus-efk.sh @@ -39,6 +39,9 @@ function check_elasticsearch { --location --fail ) + if [[ "$TLS_ENABLED" = "True" ]]; then + args+=(--cacert $OS_CACERT) + fi if ! curl "${args[@]}" $ELASTICSEARCH_URL > $output_path; then return 1 fi