fixes for tests

This commit is contained in:
John Smith 2023-06-16 13:29:25 -04:00
parent c6e2836b85
commit f3a3d5322c
4 changed files with 13 additions and 2 deletions

1
Cargo.lock generated
View File

@ -6236,6 +6236,7 @@ dependencies = [
"owo-colors", "owo-colors",
"paranoid-android", "paranoid-android",
"parking_lot 0.12.1", "parking_lot 0.12.1",
"paste",
"range-set-blaze", "range-set-blaze",
"rkyv", "rkyv",
"rtnetlink", "rtnetlink",

View File

@ -17,10 +17,15 @@ pub async fn test_all() {
test_transferstatsdownup().await; test_transferstatsdownup().await;
test_rpcstats().await; test_rpcstats().await;
test_peerstats().await; test_peerstats().await;
#[cfg(feature = "unstable-tunnels")]
test_tunnelmode().await; test_tunnelmode().await;
#[cfg(feature = "unstable-tunnels")]
test_tunnelerror().await; test_tunnelerror().await;
#[cfg(feature = "unstable-tunnels")]
test_tunnelendpoint().await; test_tunnelendpoint().await;
#[cfg(feature = "unstable-tunnels")]
test_fulltunnel().await; test_fulltunnel().await;
#[cfg(feature = "unstable-tunnels")]
test_partialtunnel().await; test_partialtunnel().await;
test_veilidloglevel().await; test_veilidloglevel().await;
test_veilidlog().await; test_veilidlog().await;

View File

@ -26,7 +26,7 @@ pub async fn test_veilidappcall() {
let orig = VeilidAppCall { let orig = VeilidAppCall {
sender: Some(fix_typedkey()), sender: Some(fix_typedkey()),
message: b"Well, hello!".to_vec(), message: b"Well, hello!".to_vec(),
id: AlignedU64::from(123), call_id: AlignedU64::from(123),
}; };
let copy = deserialize_json(&serialize_json(&orig)).unwrap(); let copy = deserialize_json(&serialize_json(&orig)).unwrap();
@ -116,12 +116,15 @@ pub async fn test_peerstats() {
// tunnel // tunnel
#[cfg(feature = "unstable-tunnels")]
pub async fn test_tunnelmode() { pub async fn test_tunnelmode() {
let orig = TunnelMode::Raw; let orig = TunnelMode::Raw;
let copy = deserialize_json(&serialize_json(&orig)).unwrap(); let copy = deserialize_json(&serialize_json(&orig)).unwrap();
assert_eq!(orig, copy); assert_eq!(orig, copy);
} }
#[cfg(feature = "unstable-tunnels")]
pub async fn test_tunnelerror() { pub async fn test_tunnelerror() {
let orig = TunnelError::NoCapacity; let orig = TunnelError::NoCapacity;
let copy = deserialize_json(&serialize_json(&orig)).unwrap(); let copy = deserialize_json(&serialize_json(&orig)).unwrap();
@ -129,6 +132,7 @@ pub async fn test_tunnelerror() {
assert_eq!(orig, copy); assert_eq!(orig, copy);
} }
#[cfg(feature = "unstable-tunnels")]
pub async fn test_tunnelendpoint() { pub async fn test_tunnelendpoint() {
let orig = TunnelEndpoint { let orig = TunnelEndpoint {
mode: TunnelMode::Raw, mode: TunnelMode::Raw,
@ -139,6 +143,7 @@ pub async fn test_tunnelendpoint() {
assert_eq!(orig, copy); assert_eq!(orig, copy);
} }
#[cfg(feature = "unstable-tunnels")]
pub async fn test_fulltunnel() { pub async fn test_fulltunnel() {
let orig = FullTunnel { let orig = FullTunnel {
id: AlignedU64::from(42), id: AlignedU64::from(42),
@ -157,6 +162,7 @@ pub async fn test_fulltunnel() {
assert_eq!(orig, copy); assert_eq!(orig, copy);
} }
#[cfg(feature = "unstable-tunnels")]
pub async fn test_partialtunnel() { pub async fn test_partialtunnel() {
let orig = PartialTunnel { let orig = PartialTunnel {
id: AlignedU64::from(42), id: AlignedU64::from(42),

View File

@ -1,6 +1,5 @@
use super::fixtures::*; use super::fixtures::*;
use crate::*; use crate::*;
use range_set_blaze::*;
// dlft // dlft