()
| 67 | } |
| 68 | |
| 69 | func (c *CacheTestSuite) TestSetToolsCacheWorks() { |
| 70 | tools := []commonParams.RunnerApplicationDownload{ |
| 71 | { |
| 72 | DownloadURL: garmTesting.Ptr("https://example.com"), |
| 73 | }, |
| 74 | } |
| 75 | c.Require().NotNil(githubToolsCache) |
| 76 | c.Require().Len(githubToolsCache.entities, 0) |
| 77 | SetGithubToolsCache(c.entity, tools) |
| 78 | c.Require().Len(githubToolsCache.entities, 1) |
| 79 | cachedTools, err := GetGithubToolsCache(c.entity.ID) |
| 80 | c.Require().NoError(err) |
| 81 | c.Require().Len(cachedTools, 1) |
| 82 | c.Require().Equal(tools[0].GetDownloadURL(), cachedTools[0].GetDownloadURL()) |
| 83 | } |
| 84 | |
| 85 | func (c *CacheTestSuite) TestSetToolsCacheWithError() { |
| 86 | tools := []commonParams.RunnerApplicationDownload{ |
nothing calls this directly
no test coverage detected