hubcio commented on code in PR #3749:
URL: https://github.com/apache/iggy/pull/3749#discussion_r3689099637
##########
core/integration/tests/server/http_tls.rs:
##########
@@ -40,11 +40,21 @@ const READY_RETRY_INTERVAL: Duration =
Duration::from_millis(50);
const REQUEST_TIMEOUT: Duration = Duration::from_secs(30);
/// Absolute path to a repo loopback cert asset. The spawned server's CWD is a
-/// temp dir, so relative paths break; `CARGO_MANIFEST_DIR` is the integration
-/// crate, whose sibling `../certs` holds the checked-in loopback material.
+/// temp dir, so relative paths break; nextest remaps the runtime
+/// `CARGO_MANIFEST_DIR` to the integration crate, whose sibling `../certs`
+/// holds the checked-in loopback material.
fn cert_asset(file: &str) -> PathBuf {
- std::fs::canonicalize(format!("{}/../certs/{file}",
env!("CARGO_MANIFEST_DIR")))
- .unwrap_or_else(|error| panic!("canonicalize repo cert asset {file}:
{error}"))
+ let manifest_dir = std::env::var_os("CARGO_MANIFEST_DIR")
Review Comment:
worth knowing this one isn't covered by pre-merge. `server/mod.rs` gates
`mod http_tls` behind `#[cfg(feature = "vsr")]` and `vsr` isn't in the
integration crate's default features, and the archive is built without
`--all-features`, so these tests only get compiled by the `clippy
--all-features` leg and never executed. the runtime `CARGO_MANIFEST_DIR` read
is fine - `harness::context::tests::test_context_paths` exercises the same
mechanism under `--workspace-remap` and passes - but the cert path itself is
unverified by CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]