(t *testing.T, s *graphjinService, name, summary string, want int)
| 450 | } |
| 451 | |
| 452 | func assertWorkflowCatalogRows(t *testing.T, s *graphjinService, name, summary string, want int) { |
| 453 | t.Helper() |
| 454 | where := `kind: { eq: "workflow" }, id: { eq: ` + strconv.Quote("workflow:"+name) + ` }` |
| 455 | if summary != "" { |
| 456 | where += `, summary: { eq: ` + strconv.Quote(summary) + ` }` |
| 457 | } |
| 458 | query := `query { gj_catalog(where: { ` + where + ` }) { id summary } }` |
| 459 | res, err := s.gj.GraphQL(sourceModeUserTestContext(), query, nil, nil) |
| 460 | if err != nil { |
| 461 | t.Fatalf("query workflow catalog row: %v", err) |
| 462 | } |
| 463 | var out struct { |
| 464 | GJCatalog []struct { |
| 465 | ID string `json:"id"` |
| 466 | Summary string `json:"summary"` |
| 467 | } `json:"gj_catalog"` |
| 468 | } |
| 469 | if err := json.Unmarshal(res.Data, &out); err != nil { |
| 470 | t.Fatalf("decode workflow catalog response: %v\n%s", err, res.Data) |
| 471 | } |
| 472 | if len(out.GJCatalog) != want { |
| 473 | t.Fatalf("workflow catalog rows = %d, want %d: %+v data=%s", len(out.GJCatalog), want, out.GJCatalog, res.Data) |
| 474 | } |
| 475 | } |
| 476 | |
| 477 | func hasRuntimeRelationship(s *graphjinService, database, table, column, target string) bool { |
| 478 | if s.runtimeCore == nil { |
no test coverage detected