diff --git a/crates/ecstore/src/config/com.rs b/crates/ecstore/src/config/com.rs index a41fe9d05..c62aa74d8 100644 --- a/crates/ecstore/src/config/com.rs +++ b/crates/ecstore/src/config/com.rs @@ -4740,14 +4740,13 @@ mod tests { ) -> Result { let current_etag = format!("config-{}", self.revision.load(Ordering::SeqCst)); let object_exists = matches!(&*self.state.lock().expect("state lock poisoned"), RecoveryReadState::Blob(_)); - if let Some(preconditions) = &opts.http_preconditions { - if preconditions + if let Some(preconditions) = &opts.http_preconditions + && (preconditions .if_match_value() .is_some_and(|etag| !object_exists || etag != current_etag) - || (object_exists && preconditions.if_none_match_value() == Some("*")) - { - return Err(Error::PreconditionFailed); - } + || (object_exists && preconditions.if_none_match_value() == Some("*"))) + { + return Err(Error::PreconditionFailed); } let mut body = Vec::new(); data.stream.read_to_end(&mut body).await?; diff --git a/scripts/e2e-run.sh b/scripts/e2e-run.sh index ed66c1aed..645184736 100755 --- a/scripts/e2e-run.sh +++ b/scripts/e2e-run.sh @@ -40,7 +40,19 @@ export RUST_BACKTRACE=full "$BIN" --address "127.0.0.1:${RUSTFS_TEST_PORT}" "$VOLUME" > "${RUSTFS_TEST_LOG}" 2>&1 & RUSTFS_PID=$! -sleep 10 +for _ in {1..60}; do + if curl --noproxy '*' --silent --fail "http://127.0.0.1:${RUSTFS_TEST_PORT}/health/ready" >/dev/null; then + break + fi + + if ! kill -0 "${RUSTFS_PID}" 2>/dev/null; then + wait "${RUSTFS_PID}" + fi + + sleep 1 +done + +curl --noproxy '*' --silent --show-error --fail "http://127.0.0.1:${RUSTFS_TEST_PORT}/health/ready" >/dev/null export AWS_ACCESS_KEY_ID="${RUSTFS_ACCESS_KEY:-rustfsadmin}" export AWS_SECRET_ACCESS_KEY="${RUSTFS_SECRET_KEY:-rustfsadmin}"