()
| 815 | } |
| 816 | |
| 817 | func (c *CacheTestSuite) TestSetGiteaEntity() { |
| 818 | credentials := params.ForgeCredentials{ |
| 819 | ID: 1, |
| 820 | Description: "test description", |
| 821 | ForgeType: params.GiteaEndpointType, |
| 822 | } |
| 823 | entity := params.ForgeEntity{ |
| 824 | ID: "test-entity", |
| 825 | EntityType: params.ForgeEntityTypeOrganization, |
| 826 | Name: "test", |
| 827 | Owner: "test", |
| 828 | Credentials: credentials, |
| 829 | } |
| 830 | |
| 831 | SetGiteaCredentials(credentials) |
| 832 | SetEntity(entity) |
| 833 | |
| 834 | cachedEntity, ok := GetEntity(entity.ID) |
| 835 | c.Require().True(ok) |
| 836 | c.Require().Equal(entity.ID, cachedEntity.ID) |
| 837 | c.Require().Equal(credentials.ID, cachedEntity.Credentials.ID) |
| 838 | c.Require().Equal(credentials.Description, cachedEntity.Credentials.Description) |
| 839 | c.Require().Equal(credentials.ForgeType, cachedEntity.Credentials.ForgeType) |
| 840 | } |
| 841 | |
| 842 | func (c *CacheTestSuite) TestGetEntitiesUsingCredentials() { |
| 843 | credentials := params.ForgeCredentials{ |
nothing calls this directly
no test coverage detected