Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Update testcontainers requirement from 0.14 to 0.15 #96

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ docker_credential = "1.0"
hmac = "0.12"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tempfile = "3.3"
testcontainers = "0.14"
testcontainers = "0.15"
tokio = { version = "1.21", features = ["macros", "fs", "rt-multi-thread"] }
tokio-util = { version = "0.7.4", features = ["compat"] }
20 changes: 8 additions & 12 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,13 @@ impl Client {
}

let request = self.client.get(&url);
let request = if n.is_some() {
request.query(&[("n", n.unwrap())])
let request = if let Some(num) = n {
request.query(&[("n", num)])
} else {
request
};
let request = if last.is_some() {
request.query(&[("last", last.unwrap())])
let request = if let Some(l) = last {
request.query(&[("last", l)])
} else {
request
};
Expand Down Expand Up @@ -1651,11 +1651,7 @@ mod test {
use tokio_util::io::StreamReader;

#[cfg(feature = "test-registry")]
use testcontainers::{
clients,
core::WaitFor,
images::{self, generic::GenericImage},
};
use testcontainers::{clients, core::WaitFor, GenericImage};

const HELLO_IMAGE_NO_TAG: &str = "webassembly.azurecr.io/hello-wasm";
const HELLO_IMAGE_TAG: &str = "webassembly.azurecr.io/hello-wasm:v1";
Expand Down Expand Up @@ -2362,19 +2358,19 @@ mod test {
// We require this fix only when testing the capability to list tags
#[cfg(feature = "test-registry")]
fn registry_image_edge() -> GenericImage {
images::generic::GenericImage::new("distribution/distribution", "edge")
GenericImage::new("distribution/distribution", "edge")
.with_wait_for(WaitFor::message_on_stderr("listening on "))
}

#[cfg(feature = "test-registry")]
fn registry_image() -> GenericImage {
images::generic::GenericImage::new("docker.io/library/registry", "2")
GenericImage::new("docker.io/library/registry", "2")
.with_wait_for(WaitFor::message_on_stderr("listening on "))
}

#[cfg(feature = "test-registry")]
fn registry_image_basic_auth(auth_path: &str) -> GenericImage {
images::generic::GenericImage::new("docker.io/library/registry", "2")
GenericImage::new("docker.io/library/registry", "2")
.with_env_var("REGISTRY_AUTH", "htpasswd")
.with_env_var("REGISTRY_AUTH_HTPASSWD_REALM", "Registry Realm")
.with_env_var("REGISTRY_AUTH_HTPASSWD_PATH", "/auth/htpasswd")
Expand Down