MCPcopy
hub / github.com/cli/cli / generateWorkflows

Function generateWorkflows

pkg/cmd/workflow/shared/shared_test.go:412–422  ·  view source on GitHub ↗

generateWorkflows returns a slice of workflows with the given count, labeled with the page number of testing pagination. The page number is used to generate unique Names and IDs for each workflow.

(t *testing.T, workflowCount int, pageNum int)

Source from the content-addressed store, hash-verified

410// with the page number of testing pagination.
411// The page number is used to generate unique Names and IDs for each workflow.
412func generateWorkflows(t *testing.T, workflowCount int, pageNum int) []Workflow {
413 t.Helper()
414 workflows := []Workflow{}
415 for i := 0; i < workflowCount; i++ {
416 workflows = append(workflows, Workflow{
417 Name: fmt.Sprintf("Workflow-%d-%d", pageNum, i),
418 ID: int64(i) + int64(pageNum-1)*100,
419 })
420 }
421 return workflows
422}

Callers 1

TestGetWorkflowsFunction · 0.85

Calls 1

HelperMethod · 0.65

Tested by

no test coverage detected