()
| 898 | } |
| 899 | |
| 900 | func (s *OrgTestSuite) TestListOrgInstances() { |
| 901 | entity, err := s.Fixtures.Orgs[0].GetEntity() |
| 902 | s.Require().Nil(err) |
| 903 | pool, err := s.Store.CreateEntityPool(s.adminCtx, entity, s.Fixtures.CreatePoolParams) |
| 904 | if err != nil { |
| 905 | s.FailNow(fmt.Sprintf("cannot create org pool: %v", err)) |
| 906 | } |
| 907 | poolInstances := []params.Instance{} |
| 908 | for i := 1; i <= 3; i++ { |
| 909 | s.Fixtures.CreateInstanceParams.Name = fmt.Sprintf("test-org-%v", i) |
| 910 | instance, err := s.Store.CreateInstance(s.adminCtx, pool.ID, s.Fixtures.CreateInstanceParams) |
| 911 | if err != nil { |
| 912 | s.FailNow(fmt.Sprintf("cannot create instance: %s", err)) |
| 913 | } |
| 914 | poolInstances = append(poolInstances, instance) |
| 915 | } |
| 916 | |
| 917 | instances, err := s.Store.ListEntityInstances(s.adminCtx, entity) |
| 918 | |
| 919 | s.Require().Nil(err) |
| 920 | s.equalInstancesByName(poolInstances, instances) |
| 921 | } |
| 922 | |
| 923 | func (s *OrgTestSuite) TestListOrgInstancesInvalidOrgID() { |
| 924 | entity := params.ForgeEntity{ |
nothing calls this directly
no test coverage detected