MCPcopy Index your code
hub / github.com/git-bug/git-bug / checkBugPresence

Function checkBugPresence

cache/repo_cache_test.go:355–365  ·  view source on GitHub ↗
(t *testing.T, cache *RepoCache, bug *BugCache, presence bool)

Source from the content-addressed store, hash-verified

353}
354
355func checkBugPresence(t *testing.T, cache *RepoCache, bug *BugCache, presence bool) {
356 t.Helper()
357
358 id := bug.Id()
359 require.Equal(t, presence, cache.bugs.lru.Contains(id))
360 b, ok := cache.bugs.cached[id]
361 require.Equal(t, presence, ok)
362 if ok {
363 require.Equal(t, bug, b)
364 }
365}
366
367func createTestRepoCacheNoEvents(t *testing.T, repo repository.TestedRepo) *RepoCache {
368 t.Helper()

Callers 1

TestCacheEvictionFunction · 0.85

Calls 2

HelperMethod · 0.80
IdMethod · 0.65

Tested by

no test coverage detected