-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TEST] Functional tests for OTLP/gRPC with mutual TLS #3227
[TEST] Functional tests for OTLP/gRPC with mutual TLS #3227
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
@@ -452,6 +452,15 @@ jobs: | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the tests.
[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.md
updated for non-trivial changes