Skip to content

Commit

Permalink
refactor!: exposed and mapped ports api
Browse files Browse the repository at this point in the history
- rename `ExposedPort` to `ContainerPort` (after #655)
- `with_mapped_port`: accept two arguments  instead of tuple
- introduce `IntoContainerPort` to make a shortcut for conversion from `u16` to `ContainerPort`
  • Loading branch information
DDtKey committed Jun 14, 2024
1 parent ce6548d commit d83740e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testcontainers/src/core/image/image_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl<RI: Into<ContainerRequest<I>>, I: Image> ImageExt<I> for RI {
) -> ContainerRequest<I> {
let runnable = self.into();
let mut ports = runnable.ports.unwrap_or_default();
ports.push(PortMapping::new(host_port, container_port.into()));
ports.push(PortMapping::new(host_port, container_port));

ContainerRequest {
ports: Some(ports),
Expand Down

0 comments on commit d83740e

Please sign in to comment.