Skip to content
10 changes: 9 additions & 1 deletion testcontainers/src/core/containers/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,15 @@ impl<I: Image> From<I> for ContainerRequest<I> {
platform: None,
network: None,
hostname: None,
labels: BTreeMap::default(),
labels: {
let mut l = BTreeMap::new();
l.insert("org.testcontainers".to_string(), "true".to_string());
Comment thread
DDtKey marked this conversation as resolved.
Outdated
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
l.insert(
"org.testcontainers.managed-by".to_string(),
"testcontainers".to_string(),
);
l
},
Comment thread
DDtKey marked this conversation as resolved.
Outdated
env_vars: BTreeMap::default(),
hosts: BTreeMap::default(),
mounts: Vec::new(),
Expand Down
1 change: 1 addition & 0 deletions testcontainers/src/runners/async_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ mod tests {
"testcontainers".to_string(),
);

labels.insert("org.testcontainers".to_string(), "true".to_string());
#[cfg(feature = "reusable-containers")]
labels.extend([(
"org.testcontainers.session-id".to_string(),
Expand Down