()
| 406 | } |
| 407 | |
| 408 | func (s *OrgTestSuite) TestCreateOrgPool() { |
| 409 | pool, err := s.Runner.CreateOrgPool(s.Fixtures.AdminContext, s.Fixtures.StoreOrgs["test-org-1"].ID, s.Fixtures.CreatePoolParams) |
| 410 | |
| 411 | s.Fixtures.PoolMgrMock.AssertExpectations(s.T()) |
| 412 | s.Fixtures.PoolMgrCtrlMock.AssertExpectations(s.T()) |
| 413 | s.Require().Nil(err) |
| 414 | |
| 415 | org, err := s.Fixtures.Store.GetOrganizationByID(s.Fixtures.AdminContext, s.Fixtures.StoreOrgs["test-org-1"].ID) |
| 416 | if err != nil { |
| 417 | s.FailNow(fmt.Sprintf("cannot get org by ID: %v", err)) |
| 418 | } |
| 419 | s.Require().Equal(1, len(org.Pools)) |
| 420 | s.Require().Equal(pool.ID, org.Pools[0].ID) |
| 421 | s.Require().Equal(s.Fixtures.CreatePoolParams.ProviderName, org.Pools[0].ProviderName) |
| 422 | s.Require().Equal(s.Fixtures.CreatePoolParams.MaxRunners, org.Pools[0].MaxRunners) |
| 423 | s.Require().Equal(s.Fixtures.CreatePoolParams.MinIdleRunners, org.Pools[0].MinIdleRunners) |
| 424 | } |
| 425 | |
| 426 | func (s *OrgTestSuite) TestCreateOrgPoolErrUnauthorized() { |
| 427 | _, err := s.Runner.CreateOrgPool(context.Background(), "dummy-org-id", s.Fixtures.CreatePoolParams) |
nothing calls this directly
no test coverage detected