[TEST] Functional tests for OTLP/gRPC with mutual TLS #3227
[TEST] Functional tests for OTLP/gRPC with mutual TLS #3227marcalff merged 6 commits intoopen-telemetry:mainfrom
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
f2bce20 to
f40c656
Compare
f40c656 to
542a112
Compare
| export TEST_BIN_DIR=${BUILD_DIR}/functional/otlp/ | ||
| export TEST_BIN_DIR="${BUILD_DIR}/functional/otlp/" | ||
|
|
||
| [ ! -f "${TEST_BIN_DIR}/${TEST_EXECUTABLE}" ] && echo "::notice::Executable ${TEST_EXECUTABLE} not built in this configuration" && exit 0 |
There was a problem hiding this comment.
Because this script gets its inputs from run_test.sh and all other CI checks that run these tests only build WITH_OTLP_HTTP, I thought this would be the easiest solution to supporting existing checks that only test HTTP functionality as well this check that does gRPC, as well.
For visibility, this message is also shown as a notice in the annotations section:
| void set_common_opts(otlp::OtlpGrpcExporterOptions &opts) | ||
| { | ||
| opts.endpoint = opt_endpoint; | ||
| opts.timeout = std::chrono::milliseconds{100}; |
There was a problem hiding this comment.
Setting a timeout to speed things up a bit, since some tests might go on for 5+ seconds before erroring out.
The observable behavior is that a "deadline exceeded" will be output as a result instead of the actual reason. This is accounted for in expect_connection_failed().
If deemed more appropriate, it could be reverted so as to let the tests fail normally.
| run: | | ||
| sudo ./ci/setup_grpc.sh | ||
| ./ci/do_ci.sh cmake.exporter.otprotocol.test | ||
| - name: generate test cert |
There was a problem hiding this comment.
Reusing this test because it is the only one enabling WITH_OTLP_GRPC_SSL_MTLS_PREVIEW and also WITH_OTLP_GRPC so it sort of made sense to add functional tests to it
[TEST] Functional tests for OTLP/gRPC with mutual TLS (open-telemetry#3227)

Fixes #2208
Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes