fixed tests
This commit is contained in:
Generated
+1
@@ -5110,6 +5110,7 @@ dependencies = [
|
||||
"fastrand 2.1.0",
|
||||
"headers",
|
||||
"hmac 0.12.1",
|
||||
"hyper 1.3.1",
|
||||
"ipnetwork 0.16.0",
|
||||
"nym-crypto",
|
||||
"nym-http-api-common",
|
||||
|
||||
@@ -38,6 +38,7 @@ nym-wireguard = { path = "../../common/wireguard" }
|
||||
nym-wireguard-types = { path = "../../common/wireguard-types", features = ["verify"] }
|
||||
|
||||
[dev-dependencies]
|
||||
hyper.workspace = true
|
||||
dashmap.workspace = true
|
||||
serde_json.workspace = true
|
||||
|
||||
|
||||
+3
-2
@@ -104,6 +104,7 @@ mod test {
|
||||
use crate::api::v1::gateway::client_interfaces::wireguard::{
|
||||
routes, WireguardAppState, WireguardAppStateInner,
|
||||
};
|
||||
use axum::body::to_bytes;
|
||||
use axum::body::Body;
|
||||
use axum::http::Request;
|
||||
use axum::http::StatusCode;
|
||||
@@ -203,7 +204,7 @@ mod test {
|
||||
nonce,
|
||||
gateway_data,
|
||||
wg_port: 8080,
|
||||
} = serde_json::from_slice(&hyper::body::to_bytes(response.into_body()).await.unwrap())
|
||||
} = serde_json::from_slice(&to_bytes(response.into_body(), usize::MAX).await.unwrap())
|
||||
.unwrap()
|
||||
else {
|
||||
panic!("invalid response")
|
||||
@@ -257,7 +258,7 @@ mod test {
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
|
||||
let clients: Vec<PeerPublicKey> =
|
||||
serde_json::from_slice(&hyper::body::to_bytes(response.into_body()).await.unwrap())
|
||||
serde_json::from_slice(&to_bytes(response.into_body(), usize::MAX).await.unwrap())
|
||||
.unwrap();
|
||||
|
||||
assert!(!clients.is_empty());
|
||||
|
||||
Reference in New Issue
Block a user