()
| 993 | } |
| 994 | |
| 995 | func (c *CacheTestSuite) TestGetAllScaleSets() { |
| 996 | entity := params.ForgeEntity{ |
| 997 | ID: "test-entity", |
| 998 | EntityType: params.ForgeEntityTypeOrganization, |
| 999 | Name: "test", |
| 1000 | Owner: "test", |
| 1001 | } |
| 1002 | scaleSet1 := params.ScaleSet{ |
| 1003 | OrgID: "test-entity", |
| 1004 | ID: 1, |
| 1005 | } |
| 1006 | scaleSet2 := params.ScaleSet{ |
| 1007 | OrgID: "test-entity", |
| 1008 | ID: 2, |
| 1009 | } |
| 1010 | |
| 1011 | SetEntity(entity) |
| 1012 | SetEntityScaleSet(entity.ID, scaleSet1) |
| 1013 | SetEntityScaleSet(entity.ID, scaleSet2) |
| 1014 | cachedEntity, ok := GetEntity(entity.ID) |
| 1015 | c.Require().True(ok) |
| 1016 | c.Require().Equal(entity.ID, cachedEntity.ID) |
| 1017 | scaleSets := GetAllScaleSets() |
| 1018 | c.Require().Len(scaleSets, 2) |
| 1019 | c.Require().Equal(scaleSets[0].ID, scaleSet1.ID) |
| 1020 | c.Require().Equal(scaleSets[1].ID, scaleSet2.ID) |
| 1021 | } |
| 1022 | |
| 1023 | func (c *CacheTestSuite) TestGetAllGetAllGithubCredentialsAsMap() { |
| 1024 | credentials1 := params.ForgeCredentials{ |
nothing calls this directly
no test coverage detected