()
| 531 | } |
| 532 | |
| 533 | func (s *OrgTestSuite) TestUpdateOrgPool() { |
| 534 | entity := params.ForgeEntity{ |
| 535 | ID: s.Fixtures.StoreOrgs["test-org-1"].ID, |
| 536 | EntityType: params.ForgeEntityTypeOrganization, |
| 537 | } |
| 538 | orgPool, err := s.Fixtures.Store.CreateEntityPool(s.Fixtures.AdminContext, entity, s.Fixtures.CreatePoolParams) |
| 539 | if err != nil { |
| 540 | s.FailNow(fmt.Sprintf("cannot create org pool: %s", err)) |
| 541 | } |
| 542 | |
| 543 | pool, err := s.Runner.UpdateOrgPool(s.Fixtures.AdminContext, s.Fixtures.StoreOrgs["test-org-1"].ID, orgPool.ID, s.Fixtures.UpdatePoolParams) |
| 544 | |
| 545 | s.Require().Nil(err) |
| 546 | s.Require().Equal(*s.Fixtures.UpdatePoolParams.MaxRunners, pool.MaxRunners) |
| 547 | s.Require().Equal(*s.Fixtures.UpdatePoolParams.MinIdleRunners, pool.MinIdleRunners) |
| 548 | } |
| 549 | |
| 550 | func (s *OrgTestSuite) TestUpdateOrgPoolErrUnauthorized() { |
| 551 | _, err := s.Runner.UpdateOrgPool(context.Background(), "dummy-org-id", "dummy-pool-id", s.Fixtures.UpdatePoolParams) |
nothing calls this directly
no test coverage detected