()
| 161 | } |
| 162 | |
| 163 | func (s *OrgTestSuite) TestCreateOrganization() { |
| 164 | // setup mocks expectations |
| 165 | s.Fixtures.PoolMgrMock.On("Start").Return(nil) |
| 166 | s.Fixtures.PoolMgrCtrlMock.On("CreateOrgPoolManager", s.Fixtures.AdminContext, mock.AnythingOfType("params.Organization"), s.Fixtures.Providers, s.Fixtures.Store).Return(s.Fixtures.PoolMgrMock, nil) |
| 167 | |
| 168 | // call tested function |
| 169 | org, err := s.Runner.CreateOrganization(s.Fixtures.AdminContext, s.Fixtures.CreateOrgParams) |
| 170 | |
| 171 | // assertions |
| 172 | s.Fixtures.PoolMgrMock.AssertExpectations(s.T()) |
| 173 | s.Fixtures.PoolMgrCtrlMock.AssertExpectations(s.T()) |
| 174 | s.Require().Nil(err) |
| 175 | s.Require().Equal(s.Fixtures.CreateOrgParams.Name, org.Name) |
| 176 | s.Require().Equal(s.Fixtures.Credentials[s.Fixtures.CreateOrgParams.CredentialsName].Name, org.Credentials.Name) |
| 177 | s.Require().Equal(params.PoolBalancerTypeRoundRobin, org.PoolBalancerType) |
| 178 | } |
| 179 | |
| 180 | func (s *OrgTestSuite) TestCreateOrganizationPoolBalancerTypePack() { |
| 181 | s.Fixtures.CreateOrgParams.PoolBalancerType = params.PoolBalancerTypePack |
nothing calls this directly
no test coverage detected