Skip to content

Commit

Permalink
test(jaeger): setup integration tests for jaeger (#739)
Browse files Browse the repository at this point in the history
* test(jaeger): add integration test for opentelemtry jaeger

* chore(jaeger): ignore testing harness in code coverage.

* chore(common): add opentelemetry-api and opentelemetry-sdk to coverage.
  • Loading branch information
TommyCpp authored Feb 20, 2022
1 parent cdd8fa0 commit 5f1bd35
Show file tree
Hide file tree
Showing 11 changed files with 695 additions and 2 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
3 changes: 3 additions & 0 deletions .github/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ coverage:
default:
target: auto
threshold: 0.5%

ignore:
- "opentelemetry-jaeger/src/testing"
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: test
args: -p opentelemetry -p opentelemetry-aws -p opentelemetry-jaeger -p opentelemetry-datadog -p opentelemetry-dynatrace -p opentelemetry-zipkin --all-features --no-fail-fast
args: -p opentelemetry -p opentelemetry-api -p opentelemetry-sdk -p opentelemetry-aws -p opentelemetry-jaeger -p opentelemetry-datadog -p opentelemetry-dynatrace -p opentelemetry-zipkin --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
Expand Down
7 changes: 6 additions & 1 deletion opentelemetry-jaeger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ tokio = { version = "1.0", features = ["net", "sync"], optional = true }
wasm-bindgen = { version = "0.2", optional = true }
wasm-bindgen-futures = { version = "0.4.18", optional = true }

tonic = { version = "0.6.2", optional = true }
prost = { version = "0.9.0", optional = true }
prost-types = { version = "0.9.0", optional = true }

[dev-dependencies]
bytes = "1"
futures-executor = "0.3"
Expand Down Expand Up @@ -77,4 +81,5 @@ wasm_collector_client = [
]
rt-tokio = ["tokio", "opentelemetry/rt-tokio"]
rt-tokio-current-thread = ["tokio", "opentelemetry/rt-tokio-current-thread"]
rt-async-std = ["async-std","opentelemetry/rt-async-std"]
rt-async-std = ["async-std", "opentelemetry/rt-async-std"]
integration_test = ["tonic", "prost", "prost-types", "rt-tokio", "collector_client"]
5 changes: 5 additions & 0 deletions opentelemetry-jaeger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@
#![cfg_attr(test, deny(warnings))]

mod exporter;

#[cfg(feature = "integration_test")]
#[doc(hidden)]
pub mod testing;

mod propagator {
//! # Jaeger Propagator
//!
Expand Down
Loading

0 comments on commit 5f1bd35

Please sign in to comment.