MCPcopy Create free account
hub / github.com/cli/cli / TestCopilotCommandIsSampledAt100

Function TestCopilotCommandIsSampledAt100

pkg/cmd/copilot/copilot_test.go:620–634  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

618}
619
620func TestCopilotCommandIsSampledAt100(t *testing.T) {
621 spy := &telemetry.CommandRecorderSpy{}
622 factory := &cmdutil.Factory{}
623 cmd := NewCmdCopilot(factory, spy, func(opts *CopilotOptions) error {
624 return nil
625 })
626 cmd.SetArgs([]string{})
627 cmd.SetIn(&bytes.Buffer{})
628 cmd.SetOut(&bytes.Buffer{})
629 cmd.SetErr(&bytes.Buffer{})
630
631 _, err := cmd.ExecuteC()
632 require.NoError(t, err)
633 require.Equal(t, ghtelemetry.SAMPLE_ALL, spy.LastSampleRate)
634}

Callers

nothing calls this directly

Calls 2

NewCmdCopilotFunction · 0.85
EqualMethod · 0.80

Tested by

no test coverage detected