()
| 1037 | } |
| 1038 | |
| 1039 | func (c *CacheTestSuite) TestGetAllGiteaCredentialsAsMap() { |
| 1040 | credentials1 := params.ForgeCredentials{ |
| 1041 | ID: 1, |
| 1042 | CreatedAt: time.Now(), |
| 1043 | } |
| 1044 | credentials2 := params.ForgeCredentials{ |
| 1045 | ID: 2, |
| 1046 | CreatedAt: time.Now().Add(1 * time.Second), |
| 1047 | } |
| 1048 | SetGiteaCredentials(credentials1) |
| 1049 | SetGiteaCredentials(credentials2) |
| 1050 | |
| 1051 | cachedCreds := GetAllGiteaCredentialsAsMap() |
| 1052 | c.Require().Len(cachedCreds, 2) |
| 1053 | c.Require().Contains(cachedCreds, credentials1.ID) |
| 1054 | c.Require().Contains(cachedCreds, credentials2.ID) |
| 1055 | } |
| 1056 | |
| 1057 | func (c *CacheTestSuite) TestGetEntityForPool() { |
| 1058 | entity := params.ForgeEntity{ |
nothing calls this directly
no test coverage detected