MCPcopy Create free account
hub / github.com/basecamp/hey-cli / makePostings

Function makePostings

internal/cmd/box_test.go:63–69  ·  view source on GitHub ↗

makePostings creates n test postings with sequential IDs starting at offset+1.

(n, offset int)

Source from the content-addressed store, hash-verified

61
62// makePostings creates n test postings with sequential IDs starting at offset+1.
63func makePostings(n, offset int) []generated.Posting {
64 postings := make([]generated.Posting, n)
65 for i := range postings {
66 postings[i] = generated.Posting{Id: int64(offset + i + 1)}
67 }
68 return postings
69}
70
71// mockFetcher returns a pageFetcher that serves a predefined sequence of pages.
72// Each call returns the next page; after all pages are exhausted it returns an error.

Calls

no outgoing calls

Tested by

no test coverage detected