(t *testing.T, ttl time.Duration)
| 98 | } |
| 99 | |
| 100 | func newMockRepoAccessCache(t *testing.T, ttl time.Duration) (*RepoAccessCache, *countingTransport) { |
| 101 | t.Helper() |
| 102 | gqlClient, counting := newMockGQLClient(testUser, false) |
| 103 | restClient := newMockRESTServer(t, "write") |
| 104 | cache := NewRepoAccessCache( |
| 105 | gqlClient, |
| 106 | restClient, |
| 107 | WithTTL(ttl), |
| 108 | WithCacheName(t.Name()), |
| 109 | ) |
| 110 | return cache, counting |
| 111 | } |
| 112 | |
| 113 | func TestRepoAccessCacheEvictsAfterTTL(t *testing.T) { |
| 114 | ctx := t.Context() |
no test coverage detected