Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions functional/otlp/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ export CERT_DIR=../cert

export TEST_BIN_DIR=${BUILD_DIR}/functional/otlp/

# SELINUX
# https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label

USE_MOUNT_OPTION=""

if [ -x "$(command -v getenforce)" ]; then
SELINUXSTATUS=$(getenforce);
if [ "${SELINUXSTATUS}" == "Enforcing" ]; then
echo "Detected SELINUX"
USE_MOUNT_OPTION=":z"
fi;
fi

${TEST_BIN_DIR}/func_otlp_http --list > test_list.txt

#
Expand Down Expand Up @@ -44,7 +57,7 @@ echo ""


docker run -d \
-v `pwd`/otel-docker-config-http.yaml:/otel-cpp/otel-config.yaml \
-v `pwd`/otel-docker-config-http.yaml:/otel-cpp/otel-config.yaml${USE_MOUNT_OPTION} \
-p 4318:4318 \
--name otelcpp-test-http \
otelcpp-func-test
Expand Down Expand Up @@ -74,10 +87,10 @@ echo "###############################################################"
echo ""

docker run -d \
-v `pwd`/otel-docker-config-https.yaml:/otel-cpp/otel-config.yaml \
-v `pwd`/../cert/ca.pem:/otel-cpp/ca.pem \
-v `pwd`/../cert/server_cert.pem:/otel-cpp/server_cert.pem \
-v `pwd`/../cert/server_cert-key.pem:/otel-cpp/server_cert-key.pem \
-v `pwd`/otel-docker-config-https.yaml:/otel-cpp/otel-config.yaml${USE_MOUNT_OPTION} \
-v `pwd`/../cert/ca.pem:/otel-cpp/ca.pem${USE_MOUNT_OPTION} \
-v `pwd`/../cert/server_cert.pem:/otel-cpp/server_cert.pem${USE_MOUNT_OPTION} \
-v `pwd`/../cert/server_cert-key.pem:/otel-cpp/server_cert-key.pem${USE_MOUNT_OPTION} \
-p 4318:4318 \
--name otelcpp-test-https \
otelcpp-func-test
Expand Down
Loading