MCPcopy Create free account
hub / github.com/cloudbase/garm / TestGetEntityPool

Method TestGetEntityPool

cache/cache_test.go:670–699  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

668}
669
670func (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
701func (c *CacheTestSuite) TestSetGiteaCredentials() {
702 credentials := params.ForgeCredentials{

Callers

nothing calls this directly

Calls 4

SetEntityFunction · 0.85
SetEntityPoolFunction · 0.85
GetEntityFunction · 0.85
GetEntityPoolFunction · 0.85

Tested by

no test coverage detected