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

Function TestLogsCommandBooleanFlags

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

Source from the content-addressed store, hash-verified

120}
121
122func TestLogsCommandBooleanFlags(t *testing.T) {
123 cmd := NewLogsCommand()
124 flags := cmd.Flags()
125
126 boolFlags := []string{"firewall", "no-firewall", "tool-graph", "parse", "json"}
127
128 for _, flagName := range boolFlags {
129 t.Run(flagName, func(t *testing.T) {
130 flag := flags.Lookup(flagName)
131 require.NotNil(t, flag, "Boolean flag should exist: %s", flagName)
132 assert.Equal(t, "false", flag.DefValue, "Boolean flag should default to false: %s", flagName)
133 })
134 }
135}
136
137func TestLogsCommandStructure(t *testing.T) {
138 tests := []struct {

Callers

nothing calls this directly

Calls 2

NewLogsCommandFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected