Skip to content

Commit 06abe3d

Browse files
authored
ci: use GHCR otel-collector image (#2830)
1 parent d2859dc commit 06abe3d

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

opentelemetry-otlp/tests/integration_test/src/test_utils.rs

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -72,32 +72,35 @@ pub async fn start_collector_container() -> Result<()> {
7272
upsert_empty_file(LOGS_FILE);
7373

7474
// Start a new container
75-
let container_instance = GenericImage::new("otel/opentelemetry-collector", "latest")
76-
.with_wait_for(WaitFor::http(
77-
HttpWaitStrategy::new("/")
78-
.with_expected_status_code(404u16)
79-
.with_port(ContainerPort::Tcp(4318)),
80-
))
81-
.with_mapped_port(4317, ContainerPort::Tcp(4317))
82-
.with_mapped_port(4318, ContainerPort::Tcp(4318))
83-
.with_mount(Mount::bind_mount(
84-
fs::canonicalize("./otel-collector-config.yaml")?.to_string_lossy(),
85-
"/etc/otelcol/config.yaml",
86-
))
87-
.with_mount(Mount::bind_mount(
88-
fs::canonicalize("./actual/logs.json")?.to_string_lossy(),
89-
"/testresults/logs.json",
90-
))
91-
.with_mount(Mount::bind_mount(
92-
fs::canonicalize("./actual/metrics.json")?.to_string_lossy(),
93-
"/testresults/metrics.json",
94-
))
95-
.with_mount(Mount::bind_mount(
96-
fs::canonicalize("./actual/traces.json")?.to_string_lossy(),
97-
"/testresults/traces.json",
98-
))
99-
.start()
100-
.await?;
75+
let container_instance = GenericImage::new(
76+
"ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector",
77+
"latest",
78+
)
79+
.with_wait_for(WaitFor::http(
80+
HttpWaitStrategy::new("/")
81+
.with_expected_status_code(404u16)
82+
.with_port(ContainerPort::Tcp(4318)),
83+
))
84+
.with_mapped_port(4317, ContainerPort::Tcp(4317))
85+
.with_mapped_port(4318, ContainerPort::Tcp(4318))
86+
.with_mount(Mount::bind_mount(
87+
fs::canonicalize("./otel-collector-config.yaml")?.to_string_lossy(),
88+
"/etc/otelcol/config.yaml",
89+
))
90+
.with_mount(Mount::bind_mount(
91+
fs::canonicalize("./actual/logs.json")?.to_string_lossy(),
92+
"/testresults/logs.json",
93+
))
94+
.with_mount(Mount::bind_mount(
95+
fs::canonicalize("./actual/metrics.json")?.to_string_lossy(),
96+
"/testresults/metrics.json",
97+
))
98+
.with_mount(Mount::bind_mount(
99+
fs::canonicalize("./actual/traces.json")?.to_string_lossy(),
100+
"/testresults/traces.json",
101+
))
102+
.start()
103+
.await?;
101104

102105
let container = Arc::new(container_instance);
103106
otel_info!(

0 commit comments

Comments
 (0)