()
| 668 | } |
| 669 | |
| 670 | func (c *CacheTestSuite) TestGetEntityPool() { |
| 671 | entity := params.ForgeEntity{ |
| 672 | ID: "test-entity", |
| 673 | EntityType: params.ForgeEntityTypeOrganization, |
| 674 | Name: "test", |
| 675 | Owner: "test", |
| 676 | } |
| 677 | |
| 678 | pool := params.Pool{ |
| 679 | ID: "pool-1", |
| 680 | OrgID: "test-entity", |
| 681 | Tags: []params.Tag{ |
| 682 | { |
| 683 | Name: "tag1", |
| 684 | }, |
| 685 | { |
| 686 | Name: "tag2", |
| 687 | }, |
| 688 | }, |
| 689 | } |
| 690 | |
| 691 | SetEntity(entity) |
| 692 | SetEntityPool(entity.ID, pool) |
| 693 | cachedEntity, ok := GetEntity(entity.ID) |
| 694 | c.Require().True(ok) |
| 695 | c.Require().Equal(entity.ID, cachedEntity.ID) |
| 696 | poolFromCache, ok := GetEntityPool(entity.ID, pool.ID) |
| 697 | c.Require().True(ok) |
| 698 | c.Require().Equal(pool.ID, poolFromCache.ID) |
| 699 | } |
| 700 | |
| 701 | func (c *CacheTestSuite) TestSetGiteaCredentials() { |
| 702 | credentials := params.ForgeCredentials{ |
nothing calls this directly
no test coverage detected