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)
| 410 | // with the page number of testing pagination. |
| 411 | // The page number is used to generate unique Names and IDs for each workflow. |
| 412 | func 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 | } |
no test coverage detected