Skip to content

Commit

Permalink
Update tests that expect a claimed nameplate
Browse files Browse the repository at this point in the history
  • Loading branch information
JustusFT committed Mar 6, 2023
1 parent 48a7c7b commit 7c13ce8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/core/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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;

Expand All @@ -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(
Expand Down

0 comments on commit 7c13ce8

Please sign in to comment.