MCPcopy Create free account
hub / github.com/github/gh-aw / TestLogsCommandArgs

Function TestLogsCommandArgs

pkg/cli/logs_command_test.go:158–172  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

156}
157
158func TestLogsCommandArgs(t *testing.T) {
159 cmd := NewLogsCommand()
160
161 // Logs command accepts 0 or 1 argument (workflow is optional)
162 // Only test if Args validator is set
163 if cmd.Args != nil {
164 // Verify it accepts no arguments
165 err := cmd.Args(cmd, []string{})
166 require.NoError(t, err, "Should not error with no arguments")
167
168 // Verify it accepts 1 argument
169 err = cmd.Args(cmd, []string{"workflow1"})
170 require.NoError(t, err, "Should not error with 1 argument")
171 }
172}
173
174func TestLogsCommandMutuallyExclusiveFlags(t *testing.T) {
175 cmd := NewLogsCommand()

Callers

nothing calls this directly

Calls 1

NewLogsCommandFunction · 0.85

Tested by

no test coverage detected