From 7c13ce88b5ad5666ed084f9d1241159d0a1ad7d8 Mon Sep 17 00:00:00 2001 From: Justus Tumacder Date: Mon, 6 Mar 2023 10:17:10 +0800 Subject: [PATCH] Update tests that expect a claimed nameplate --- src/core/test.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/test.rs b/src/core/test.rs index f3785631..5e9d99ed 100644 --- a/src/core/test.rs +++ b/src/core/test.rs @@ -75,7 +75,7 @@ pub async fn test_file_rust2rust() -> eyre::Result<()> { let code = code_rx.await?; log::info!("Got code over local: {}", &code); let (welcome, wormhole) = - Wormhole::connect_with_code(transfer::APP_CONFIG.id(TEST_APPID), code, false) + Wormhole::connect_with_code(transfer::APP_CONFIG.id(TEST_APPID), code, true) .await?; if let Some(welcome) = &welcome.welcome { log::info!("Got welcome: {}", welcome); @@ -151,7 +151,7 @@ pub async fn test_4096_file_rust2rust() -> eyre::Result<()> { let code = code_rx.await?; log::info!("Got code over local: {}", &code); let (welcome, wormhole) = - Wormhole::connect_with_code(transfer::APP_CONFIG.id(TEST_APPID), code, false) + Wormhole::connect_with_code(transfer::APP_CONFIG.id(TEST_APPID), code, true) .await?; if let Some(welcome) = &welcome.welcome { log::info!("Got welcome: {}", welcome); @@ -225,7 +225,7 @@ pub async fn test_empty_file_rust2rust() -> eyre::Result<()> { let code = code_rx.await?; log::info!("Got code over local: {}", &code); let (welcome, wormhole) = - Wormhole::connect_with_code(transfer::APP_CONFIG.id(TEST_APPID), code, false) + Wormhole::connect_with_code(transfer::APP_CONFIG.id(TEST_APPID), code, true) .await?; if let Some(welcome) = &welcome.welcome { log::info!("Got welcome: {}", welcome); @@ -333,7 +333,7 @@ pub async fn test_send_many() -> eyre::Result<()> { for i in 0..5usize { log::info!("Receiving file #{}", i); let (_welcome, wormhole) = - Wormhole::connect_with_code(transfer::APP_CONFIG.id(TEST_APPID), code.clone(), false) + Wormhole::connect_with_code(transfer::APP_CONFIG.id(TEST_APPID), code.clone(), true) .await?; log::info!("Got key: {}", &wormhole.key); let req = crate::transfer::request_file( @@ -394,7 +394,7 @@ pub async fn test_wrong_code() -> eyre::Result<()> { APP_CONFIG, /* Making a wrong code here by appending bullshit */ Code::new(&nameplate, "foo-bar"), - false, + true, ) .await; @@ -417,9 +417,9 @@ pub async fn test_crowded() -> eyre::Result<()> { let (welcome, connector1) = Wormhole::connect_without_code(APP_CONFIG, 2).await?; log::info!("This test's code is: {}", &welcome.code); - let connector2 = Wormhole::connect_with_code(APP_CONFIG, welcome.code.clone(), false); + let connector2 = Wormhole::connect_with_code(APP_CONFIG, welcome.code.clone(), true); - let connector3 = Wormhole::connect_with_code(APP_CONFIG, welcome.code.clone(), false); + let connector3 = Wormhole::connect_with_code(APP_CONFIG, welcome.code.clone(), true); match futures::try_join!(connector1, connector2, connector3).unwrap_err() { magic_wormhole::WormholeError::ServerError(