From 0b962567fa3d648b268e37eede506c13a5f4c107 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Thu, 26 Aug 2021 15:03:27 -0400 Subject: [PATCH] vms: make ssh-keygen quiet by default Always succeeds. Its output clutters the log. Signed-off-by: David Crawshaw --- tstest/integration/vms/harness_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tstest/integration/vms/harness_test.go b/tstest/integration/vms/harness_test.go index 7b5eeddfa..50fd917a0 100644 --- a/tstest/integration/vms/harness_test.go +++ b/tstest/integration/vms/harness_test.go @@ -96,7 +96,11 @@ func newHarness(t *testing.T) *Harness { hs := &http.Server{Handler: mux} go hs.Serve(ln) - run(t, dir, "ssh-keygen", "-t", "ed25519", "-f", "machinekey", "-N", ``) + cmd := exec.Command("ssh-keygen", "-t", "ed25519", "-f", "machinekey", "-N", "") + cmd.Dir = dir + if out, err := cmd.CombinedOutput(); err != nil { + t.Fatalf("ssh-keygen: %v, %s", err, out) + } pubkey, err := os.ReadFile(filepath.Join(dir, "machinekey.pub")) if err != nil { t.Fatalf("can't read ssh key: %v", err)