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