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

Method TestSetErrorOnNonExistingCacheEntity

cache/cache_test.go:105–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103}
104
105func (c *CacheTestSuite) TestSetErrorOnNonExistingCacheEntity() {
106 entity := params.ForgeEntity{
107 ID: "non-existing-entity",
108 }
109 c.Require().NotNil(githubToolsCache)
110 c.Require().Len(githubToolsCache.entities, 0)
111 SetGithubToolsCacheError(entity, runnerErrors.ErrNotFound)
112
113 storedEntity, err := GetGithubToolsCache(entity.ID)
114 c.Require().Error(err)
115 c.Require().Nil(storedEntity)
116}
117
118func (c *CacheTestSuite) TestTimedOutToolsCache() {
119 tools := []commonParams.RunnerApplicationDownload{

Callers

nothing calls this directly

Calls 4

SetGithubToolsCacheErrorFunction · 0.85
GetGithubToolsCacheFunction · 0.85
LenMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected