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

Function TestListPorts

pkg/cmd/codespace/ports_test.go:14–30  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestListPorts(t *testing.T) {
15 ctx := t.Context()
16
17 mockApi := GetMockApi(false)
18 ios, _, _, _ := iostreams.Test()
19
20 a := &App{
21 io: ios,
22 apiClient: mockApi,
23 }
24
25 selector := &CodespaceSelector{api: a.apiClient, codespaceName: "codespace-name"}
26 err := a.ListPorts(ctx, selector, nil)
27 if err != nil {
28 t.Errorf("unexpected error: %v", err)
29 }
30}
31
32func TestPortsUpdateVisibilitySuccess(t *testing.T) {
33 portVisibilities := []portVisibility{

Callers

nothing calls this directly

Calls 4

ListPortsMethod · 0.95
TestFunction · 0.92
GetMockApiFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected