metropolis: implement NodeManagement.Logs
This takes the implementation from the debug service, dusts it off a
bit, adds tests and moves eerything to the new node mgmt service.
Change-Id: Id3b70126a2551775d8328c0c4e424ec0e675f40f
Reviewed-on: https://review.monogon.dev/c/monogon/+/1439
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/cli/metroctl/test/test.go b/metropolis/cli/metroctl/test/test.go
index 5468834..872f7b3 100644
--- a/metropolis/cli/metroctl/test/test.go
+++ b/metropolis/cli/metroctl/test/test.go
@@ -265,6 +265,20 @@
return nil
})
})
+ t.Run("logs [nodeID]", func(t *testing.T) {
+ util.TestEventual(t, "metroctl logs [nodeID]", ctx, 10*time.Second, func(ctx context.Context) error {
+ var args []string
+ args = append(args, commonOpts...)
+ args = append(args, endpointOpts...)
+ args = append(args, "node", "logs", cl.NodeIDs[1])
+
+ if err := mctlFailIfMissing(t, ctx, args, "Cluster enrolment done."); err != nil {
+ return err
+ }
+
+ return nil
+ })
+ })
t.Run("set/unset role", func(t *testing.T) {
util.TestEventual(t, "metroctl set/unset role KubernetesController", ctx, 10*time.Second, func(ctx context.Context) error {
nid := cl.NodeIDs[1]