()
| 1138 | } |
| 1139 | |
| 1140 | func (c *CacheTestSuite) TestGetScaleSetByID() { |
| 1141 | entity := params.ForgeEntity{ |
| 1142 | ID: "test-entity", |
| 1143 | EntityType: params.ForgeEntityTypeOrganization, |
| 1144 | Name: "test", |
| 1145 | Owner: "test", |
| 1146 | } |
| 1147 | scaleSet := params.ScaleSet{ |
| 1148 | ID: 1, |
| 1149 | OrgID: "test-entity", |
| 1150 | Enabled: true, |
| 1151 | } |
| 1152 | |
| 1153 | SetEntity(entity) |
| 1154 | SetEntityScaleSet(entity.ID, scaleSet) |
| 1155 | |
| 1156 | retrievedScaleSet, ok := GetScaleSetByID(scaleSet.ID) |
| 1157 | c.Require().True(ok) |
| 1158 | c.Require().Equal(scaleSet.ID, retrievedScaleSet.ID) |
| 1159 | c.Require().Equal(scaleSet.Enabled, retrievedScaleSet.Enabled) |
| 1160 | |
| 1161 | nonExistentScaleSet, ok := GetScaleSetByID(999) |
| 1162 | c.Require().False(ok) |
| 1163 | c.Require().Equal(params.ScaleSet{}, nonExistentScaleSet) |
| 1164 | } |
| 1165 | |
| 1166 | func (c *CacheTestSuite) TestGetPoolByIDWithMultiplePools() { |
| 1167 | entity := params.ForgeEntity{ |
nothing calls this directly
no test coverage detected