()
| 949 | } |
| 950 | |
| 951 | func (s *OrgTestSuite) TestAddOrgEntityEvent() { |
| 952 | org, err := s.Store.CreateOrganization( |
| 953 | s.adminCtx, |
| 954 | s.Fixtures.CreateOrgParams.Name, |
| 955 | s.testCreds, |
| 956 | s.Fixtures.CreateOrgParams.WebhookSecret, |
| 957 | params.PoolBalancerTypeRoundRobin, |
| 958 | false) |
| 959 | |
| 960 | s.Require().Nil(err) |
| 961 | entity, err := org.GetEntity() |
| 962 | s.Require().Nil(err) |
| 963 | err = s.Store.AddEntityEvent(s.adminCtx, entity, params.StatusEvent, params.EventInfo, "this is a test", 20) |
| 964 | s.Require().Nil(err) |
| 965 | |
| 966 | org, err = s.Store.GetOrganizationByID(s.adminCtx, org.ID) |
| 967 | s.Require().Nil(err) |
| 968 | s.Require().Equal(1, len(org.Events)) |
| 969 | s.Require().Equal(params.StatusEvent, org.Events[0].EventType) |
| 970 | s.Require().Equal(params.EventInfo, org.Events[0].EventLevel) |
| 971 | s.Require().Equal("this is a test", org.Events[0].Message) |
| 972 | } |
| 973 | |
| 974 | func (s *OrgTestSuite) TestUpdateOrganizationPoolInvalidOrgID() { |
| 975 | entity := params.ForgeEntity{ |
nothing calls this directly
no test coverage detected