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",
"paranoid-android",
"parking_lot 0.12.1",
"paste",
"range-set-blaze",
"rkyv",
"rtnetlink",

View File

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

View File

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

View File

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