Skip to content

Commit 277df67

Browse files
committed
unit test default endpoint
1 parent 04593ec commit 277df67

File tree

1 file changed

+13
-0
lines changed
  • opentelemetry-otlp/src/exporter

1 file changed

+13
-0
lines changed

opentelemetry-otlp/src/exporter/mod.rs

+13
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,19 @@ mod tests {
315315
);
316316
}
317317

318+
#[cfg(feature = "http-json")]
319+
#[test]
320+
fn test_default_http_json_endpoint() {
321+
use crate::WithExportConfig;
322+
323+
let exporter_builder = crate::new_exporter().http().with_protocol(crate::Protocol::HttpJson);
324+
325+
assert_eq!(
326+
exporter_builder.exporter_config.endpoint,
327+
"http://localhost:4318"
328+
);
329+
}
330+
318331
#[test]
319332
fn test_url_decode() {
320333
let test_cases = vec![

0 commit comments

Comments
 (0)