Skip to content

Commit

Permalink
Disable dubious test case
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Dec 12, 2023
1 parent 6128af7 commit d10527e
Showing 1 changed file with 0 additions and 57 deletions.
57 changes: 0 additions & 57 deletions test/test-manager/src/tests/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,63 +281,6 @@ pub async fn test_install_new_app(_: TestContext, rpc: ServiceClient) -> Result<
Ok(())
}

/// Install the multiple times starting from a connected state with auto-connect
/// disabled, failing if the app starts in a disconnected state.
///
/// This test is supposed to guard against regressions to this fix included in
/// the 2021.3-beta1 release:
/// https://github.com/mullvad/mullvadvpn-app/blob/main/CHANGELOG.md#security-10
#[test_function(priority = -150)]
pub async fn test_installation_idempotency(
_: TestContext,
rpc: ServiceClient,
mut mullvad_client: ManagementServiceClient,
) -> Result<(), Error> {
// Connect to any relay
connect_and_wait(&mut mullvad_client).await?;
// Disable auto-connect
mullvad_client
.set_auto_connect(false)
.await
.expect("failed to enable auto-connect");
// Check for traffic leaks during the installation processes.
//
// Start continously pinging while monitoring the network traffic. No
// traffic should be observed going outside of the tunnel during either
// installation process.
let pinger = Pinger::start(&rpc).await;
for _ in 1..=2 {
// install package
log::debug!("Installing new app");
rpc.install_app(get_package_desc(&TEST_CONFIG.current_app_filename)?)
.await?;
// verify that daemon is running
wait_for_tunnel_state(mullvad_client.clone(), |state| state.is_connected())
.await
.map_err(|err| {
log::error!(
"App did not start in the expected `Connected` state after the installation process."
);
err
})?;
// Wait for an arbitrary amount of time. The point is that the pinger
// should be able to ping while the newly installed app is running.
if let Some(delay) = pinger.period().checked_mul(3) {
tokio::time::sleep(delay).await;
}
}
// Make sure that no network leak occured during any installation process.
let guest_ip = pinger.guest_ip;
let monitor_result = pinger.stop().await.unwrap();
assert_eq!(
monitor_result.packets.len(),
0,
"observed unexpected packets from {guest_ip}"
);

Ok(())
}

fn get_app_env() -> HashMap<String, String> {
let mut map = HashMap::new();

Expand Down

0 comments on commit d10527e

Please sign in to comment.