Skip to content

Commit 63e62ea

Browse files
committed
Remove redundant _test-util feature flag
1 parent 08e46f2 commit 63e62ea

4 files changed

Lines changed: 6 additions & 13 deletions

File tree

payjoin-mailroom/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ default = ["bootstrap"]
1818
bootstrap = ["connect-bootstrap", "ws-bootstrap"]
1919
connect-bootstrap = []
2020
ws-bootstrap = ["dep:tokio-tungstenite", "dep:rustls"]
21-
_test-util = []
22-
_manual-tls = ["dep:axum-server", "dep:rustls", "_test-util"]
21+
_manual-tls = ["dep:axum-server", "dep:rustls"]
2322
acme = ["dep:tokio-rustls-acme", "dep:axum-server", "dep:rustls"]
2423
access-control = ["dep:flate2", "dep:ipnet", "dep:maxminddb", "dep:reqwest"]
2524
telemetry = ["dep:opentelemetry-otlp"]

payjoin-mailroom/src/ohttp_relay/gateway_prober.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ use tokio::time::Instant;
1414

1515
use super::gateway_uri::GatewayUri;
1616

17-
// these are only pub for the integration test
18-
pub const MAGIC_BIP77_PURPOSE: &[u8] = b"BIP77 454403bb-9f7b-4385-b31f-acd2dae20b7e";
19-
pub const ALLOWED_PURPOSES_CONTENT_TYPE: &str = "application/x-ohttp-allowed-purposes";
17+
const MAGIC_BIP77_PURPOSE: &[u8] = b"BIP77 454403bb-9f7b-4385-b31f-acd2dae20b7e";
18+
const ALLOWED_PURPOSES_CONTENT_TYPE: &str = "application/x-ohttp-allowed-purposes";
2019
const DEFAULT_CAPACITY: usize = 1000;
2120

2221
#[derive(PartialEq, Eq, Clone, Copy, Debug)]

payjoin-mailroom/src/ohttp_relay/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ use hyper_util::rt::TokioExecutor;
2323
use tracing::instrument;
2424

2525
pub mod error;
26-
#[cfg(not(feature = "_test-util"))]
2726
mod gateway_prober;
28-
#[cfg(feature = "_test-util")]
29-
pub mod gateway_prober;
3027
mod gateway_uri;
3128
pub mod sentinel;
3229
pub use sentinel::SentinelTag;
@@ -80,7 +77,7 @@ impl Service {
8077
Self { config: Arc::new(config) }
8178
}
8279

83-
#[cfg(feature = "_test-util")]
80+
#[cfg(feature = "_manual-tls")]
8481
pub async fn new_with_roots(
8582
sentinel_tag: SentinelTag,
8683
root_store: rustls::RootCertStore,

payjoin-mailroom/tests/integration.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#[cfg(test)]
2-
#[cfg(feature = "_test-util")]
32
mod integration {
43
use std::fs::File;
54
use std::io::Read;
@@ -18,9 +17,6 @@ mod integration {
1817
use hyper_rustls::HttpsConnectorBuilder;
1918
use hyper_util::client::legacy::Client;
2019
use hyper_util::rt::{TokioExecutor, TokioIo};
21-
use payjoin_mailroom::ohttp_relay::gateway_prober::{
22-
ALLOWED_PURPOSES_CONTENT_TYPE, MAGIC_BIP77_PURPOSE,
23-
};
2420
use payjoin_mailroom::ohttp_relay::*;
2521
use payjoin_test_utils::init_ohttp_relay;
2622
use rcgen::Certificate;
@@ -42,6 +38,8 @@ mod integration {
4238
const ENCAPSULATED_REQ: &str = "010020000100014b28f881333e7c164ffc499ad9796f877f4e1051ee6d31bad19dec96c208b4726374e469135906992e1268c594d2a10c695d858c40a026e7965e7d86b83dd440b2c0185204b4d63525";
4339
const ENCAPSULATED_RES: &str =
4440
"c789e7151fcba46158ca84b04464910d86f9013e404feea014e7be4a441f234f857fbd";
41+
const MAGIC_BIP77_PURPOSE: &[u8] = b"BIP77 454403bb-9f7b-4385-b31f-acd2dae20b7e";
42+
const ALLOWED_PURPOSES_CONTENT_TYPE: &str = "application/x-ohttp-allowed-purposes";
4543

4644
/// See: https://www.ietf.org/rfc/rfc9458.html#name-complete-example-of-a-reque
4745
#[tokio::test]

0 commit comments

Comments
 (0)