()
| 504 | } |
| 505 | |
| 506 | func (s *OrgTestSuite) TestListOrgPools() { |
| 507 | entity := params.ForgeEntity{ |
| 508 | ID: s.Fixtures.StoreOrgs["test-org-1"].ID, |
| 509 | EntityType: params.ForgeEntityTypeOrganization, |
| 510 | } |
| 511 | orgPools := []params.Pool{} |
| 512 | for i := 1; i <= 2; i++ { |
| 513 | s.Fixtures.CreatePoolParams.Image = fmt.Sprintf("test-org-%v", i) |
| 514 | pool, err := s.Fixtures.Store.CreateEntityPool(s.Fixtures.AdminContext, entity, s.Fixtures.CreatePoolParams) |
| 515 | if err != nil { |
| 516 | s.FailNow(fmt.Sprintf("cannot create org pool: %v", err)) |
| 517 | } |
| 518 | orgPools = append(orgPools, pool) |
| 519 | } |
| 520 | |
| 521 | pools, err := s.Runner.ListOrgPools(s.Fixtures.AdminContext, s.Fixtures.StoreOrgs["test-org-1"].ID) |
| 522 | |
| 523 | s.Require().Nil(err) |
| 524 | garmTesting.EqualDBEntityID(s.T(), orgPools, pools) |
| 525 | } |
| 526 | |
| 527 | func (s *OrgTestSuite) TestListOrgPoolsErrUnauthorized() { |
| 528 | _, err := s.Runner.ListOrgPools(context.Background(), "dummy-org-id") |
nothing calls this directly
no test coverage detected