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

Function TestLogsCommandMutuallyExclusiveFlags

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

Source from the content-addressed store, hash-verified

172}
173
174func TestLogsCommandMutuallyExclusiveFlags(t *testing.T) {
175 cmd := NewLogsCommand()
176 flags := cmd.Flags()
177
178 // firewall and no-firewall are mutually exclusive
179 firewallFlag := flags.Lookup("firewall")
180 noFirewallFlag := flags.Lookup("no-firewall")
181
182 require.NotNil(t, firewallFlag, "firewall flag should exist")
183 require.NotNil(t, noFirewallFlag, "no-firewall flag should exist")
184
185 // Both flags exist and are boolean
186 assert.Equal(t, "bool", firewallFlag.Value.Type(), "firewall should be boolean")
187 assert.Equal(t, "bool", noFirewallFlag.Value.Type(), "no-firewall should be boolean")
188}
189
190func TestLogsCommandCountFlag(t *testing.T) {
191 cmd := NewLogsCommand()

Callers

nothing calls this directly

Calls 1

NewLogsCommandFunction · 0.85

Tested by

no test coverage detected