c/takeover/e2e: add takeover end-to-end test
This adds an end-to-end test to the takeover system.
It launches a QEMU VM running a Debian Cloud Image which is configured
via cloud-init to accept SSH access from the test.
It connects to that VM via SSH, copies the takeover binary under test
to it via SFTP and launches it.
It passes a test TakeoverInit message to it, performs basic sanity
checking on the response and then looks on the serial port for a flag
mesage that the agent has started.
Change-Id: I8edce6163259da305bb43660a2d70474f7f11612
Reviewed-on: https://review.monogon.dev/c/monogon/+/1262
Reviewed-by: Serge Bazanski <serge@monogon.tech>
Tested-by: Leopold Schabel <leo@monogon.tech>
diff --git a/WORKSPACE b/WORKSPACE
index 0f044e4..d61b7d0 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -359,3 +359,12 @@
load("//third_party/sandboxroot:repositories.bzl", "sandbox_dependencies")
sandbox_dependencies()
+
+# Used by tests in cloud/takeover
+http_file(
+ name = "debian_11_cloudimage",
+ sha256 = "14caeec68ba3129a115a9b57396d08dc0973cc9f569ce049232d7d15d768ad41",
+ urls = [
+ "https://cloud.debian.org/images/cloud/bullseye/20230124-1270/debian-11-genericcloud-amd64-20230124-1270.qcow2",
+ ],
+)
\ No newline at end of file