(restClient *gogithub.Client, ttl time.Duration)
| 100 | } |
| 101 | |
| 102 | func stubRepoAccessCache(restClient *gogithub.Client, ttl time.Duration) *lockdown.RepoAccessCache { |
| 103 | cacheName := fmt.Sprintf("repo-access-cache-test-%d", time.Now().UnixNano()) |
| 104 | return lockdown.NewRepoAccessCache( |
| 105 | githubv4.NewClient(newRepoAccessHTTPClient()), |
| 106 | restClient, |
| 107 | lockdown.WithTTL(ttl), |
| 108 | lockdown.WithCacheName(cacheName), |
| 109 | ) |
| 110 | } |
| 111 | |
| 112 | func mockRESTPermissionServer(t *testing.T, defaultPerm string, overrides map[string]string) *gogithub.Client { |
| 113 | t.Helper() |
no test coverage detected