tests: Add basic integration testing

Add basic integration testing of the hypervisor using a cloud-init to
configure the VM at boot and SSH to control it at runtime.

Initial test just boots the VM up checks some basic resources and
reboots. With a second test that calls into the first to check that
subsequent tests work correctly.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2019-05-23 16:45:13 +01:00
parent f63d4a7418
commit ddce3df826
7 changed files with 423 additions and 1 deletions

View file

@ -0,0 +1,3 @@
{
"hostname" : "cloud"
}

View file

@ -0,0 +1,17 @@
#cloud-config
users:
- name: admin
passwd: $6$7125787751a8d18a$sHwGySomUA1PawiNFWVCKYQN.Ec.Wzz0JtPPL1MvzFrkwmop2dq7.4CYf03A5oemPQ4pOFCCrtCelvFBEle/K.
sudo:
- ALL=(ALL) NOPASSWD:ALL
write_files:
-
path: /etc/systemd/network/00-static.network
permissions: 0644
content: |
[Match]
Name=en*
[Network]
Address=192.168.2.2/24
Gateway=192.168.2.1