Skip to content

Commit

Permalink
Merge pull request #817 from kubewarden/dependabot/cargo/testcontaine…
Browse files Browse the repository at this point in the history
…rs-0.17.0

build(deps): Bump testcontainers from 0.16.7 to 0.17.0
  • Loading branch information
flavio authored May 28, 2024
2 parents 3ff7348 + a6d4fd3 commit 8dbc9c0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
20 changes: 17 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ rstest = "0.19.0"
tempfile = "3.10.1"
assert_cmd = "2.0.14"
predicates = "3.1.0"
testcontainers = { version = "0.16", features = ["blocking"] }
testcontainers = { version = "0.17", features = ["blocking"] }
8 changes: 6 additions & 2 deletions tests/airgap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ fn test_airgap() {
// Run registry
let registry_image = testcontainers::GenericImage::new("docker.io/library/registry", "2")
.with_wait_for(WaitFor::message_on_stderr("listening on "));
let testcontainer = registry_image.start();
let port = testcontainer.get_host_port_ipv4(5000);
let testcontainer = registry_image
.start()
.expect("Failed to start registry container");
let port = testcontainer
.get_host_port_ipv4(5000)
.expect("Failed to get host port");

// Save policies
let mut save_policies_script = setup_airgap_script_command(
Expand Down
8 changes: 6 additions & 2 deletions tests/e2e.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,12 @@ fn test_save_and_load() {
fn test_push() {
let registry_image = testcontainers::GenericImage::new("docker.io/library/registry", "2")
.with_wait_for(WaitFor::message_on_stderr("listening on "));
let testcontainer = registry_image.start();
let port = testcontainer.get_host_port_ipv4(5000);
let testcontainer = registry_image
.start()
.expect("Failed to start registry container");
let port = testcontainer
.get_host_port_ipv4(5000)
.expect("Failed to get port");

let tempdir = tempdir().unwrap();
pull_policies(tempdir.path(), POLICIES);
Expand Down

0 comments on commit 8dbc9c0

Please sign in to comment.