From fd72612e91bb07f105898851a3967d2c62288924 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Thu, 22 Apr 2021 10:26:29 +0100 Subject: [PATCH] tests: Extend test_tap_from_fd to reboot Check that the VM comes back with the correct network setup after a reboot. Signed-off-by: Rob Bradford --- tests/integration.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/integration.rs b/tests/integration.rs index f40d27de6..f771085f6 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -5393,6 +5393,17 @@ mod tests { .unwrap_or_default(), 2 ); + guest.ssh_command("sudo reboot").unwrap(); + guest.wait_vm_boot(None).unwrap(); + assert_eq!( + guest + .ssh_command("ip -o link | wc -l") + .unwrap() + .trim() + .parse::() + .unwrap_or_default(), + 2 + ); }); let _ = child.kill();