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

Function generateCodespaceList

internal/codespaces/api/api_test.go:20–28  ·  view source on GitHub ↗
(start int, end int)

Source from the content-addressed store, hash-verified

18)
19
20func generateCodespaceList(start int, end int) []*Codespace {
21 codespacesList := []*Codespace{}
22 for i := start; i < end; i++ {
23 codespacesList = append(codespacesList, &Codespace{
24 Name: fmt.Sprintf("codespace-%d", i),
25 })
26 }
27 return codespacesList
28}
29
30func createFakeListEndpointServer(t *testing.T, initialTotal int, finalTotal int) *httptest.Server {
31 return httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected