cmd: test command checks

This commit is contained in:
Vincent Bernat
2023-07-30 20:27:38 +02:00
parent e88b53eada
commit 02e527915b
5 changed files with 63 additions and 1 deletions

View File

@@ -97,3 +97,14 @@ func TestOrchestratorConfig(t *testing.T) {
})
}
}
func TestOrchestrator(t *testing.T) {
root := RootCmd
buf := new(bytes.Buffer)
root.SetOut(buf)
root.SetArgs([]string{"orchestrator", "--check", "/dev/null"})
err := root.Execute()
if err != nil {
t.Errorf("`orchestrator` error:\n%+v", err)
}
}