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

Method TestGetAllGithubCredentials

cache/cache_test.go:189–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187}
188
189func (c *CacheTestSuite) TestGetAllGithubCredentials() {
190 credentials1 := params.ForgeCredentials{
191 ID: 1,
192 }
193 credentials2 := params.ForgeCredentials{
194 ID: 2,
195 }
196 SetGithubCredentials(credentials1)
197 SetGithubCredentials(credentials2)
198
199 cachedCreds := GetAllGithubCredentials()
200 c.Require().Len(cachedCreds, 2)
201 c.Require().Contains(cachedCreds, credentials1)
202 c.Require().Contains(cachedCreds, credentials2)
203}
204
205func (c *CacheTestSuite) TestSetInstanceCache() {
206 instance := params.Instance{

Callers

nothing calls this directly

Calls 3

SetGithubCredentialsFunction · 0.85
GetAllGithubCredentialsFunction · 0.85
LenMethod · 0.65

Tested by

no test coverage detected