m/cli/takeover/e2e: test with metroctl
This extends the starting end of the takeover end-to-end test by
executing metroctl instead of duplicating some of the logic in the test.
VM logs are now printed with %q such that that terminal escape codes are
printed escaped instead of raw. Without this, parts of the logs are
obscured after a new kernel boots.
Change-Id: I05de3eb2ce142a99815eba6b978dad92772fe10f
Reviewed-on: https://review.monogon.dev/c/monogon/+/4034
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/metropolis/cli/takeover/e2e/BUILD.bazel b/metropolis/cli/takeover/e2e/BUILD.bazel
index 25032ed..b085947 100644
--- a/metropolis/cli/takeover/e2e/BUILD.bazel
+++ b/metropolis/cli/takeover/e2e/BUILD.bazel
@@ -4,6 +4,7 @@
name = "e2e_test",
srcs = ["main_test.go"],
data = [
+ "//metropolis/cli/metroctl:metroctl_lite",
"//metropolis/cli/takeover",
"//metropolis/installer/test/testos:testos_bundle",
"//third_party/edk2:OVMF_CODE.fd",
@@ -16,16 +17,14 @@
"xOvmfCodePath": "$(rlocationpath //third_party/edk2:OVMF_CODE.fd )",
"xCloudImagePath": "$(rlocationpath @debian_11_cloudimage//file )",
"xTakeoverPath": "$(rlocationpath //metropolis/cli/takeover )",
+ "xMetroctlPath": "$(rlocationpath //metropolis/cli/metroctl:metroctl_lite )",
},
deps = [
- "//go/net/ssh",
- "//metropolis/proto/api",
- "//metropolis/test/launch",
"//osbase/fat32",
"//osbase/freeport",
"@io_bazel_rules_go//go/runfiles",
- "@org_golang_google_protobuf//proto",
"@org_golang_x_crypto//ssh",
+ "@org_golang_x_crypto//ssh/agent",
"@org_golang_x_sys//unix",
],
)