From 9b98fc06489353053564b431ac0c0d73a5c55a56 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 21 Dec 2022 21:54:36 +0100 Subject: cache: tie up the refactor up to compiling --- bridge/github/import_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bridge/github/import_test.go') diff --git a/bridge/github/import_test.go b/bridge/github/import_test.go index 5575de98..6539a52f 100644 --- a/bridge/github/import_test.go +++ b/bridge/github/import_test.go @@ -28,8 +28,11 @@ func TestGithubImporter(t *testing.T) { repo := repository.CreateGoGitTestRepo(t, false) - backend, err := cache.NewRepoCache(repo) + backend, buildEvents, err := cache.NewRepoCache(repo) require.NoError(t, err) + for event := range buildEvents { + require.NoError(t, event.Err) + } defer backend.Close() interrupt.RegisterCleaner(backend.Close) @@ -171,11 +174,11 @@ func TestGithubImporter(t *testing.T) { fmt.Printf("test repository imported in %f seconds\n", time.Since(start).Seconds()) - require.Len(t, backend.AllBugsIds(), len(tests)) + require.Len(t, backend.Bugs().AllIds(), len(tests)) for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - b, err := backend.ResolveBugCreateMetadata(metaKeyGithubUrl, tt.url) + b, err := backend.Bugs().ResolveBugCreateMetadata(metaKeyGithubUrl, tt.url) require.NoError(t, err) ops := b.Snapshot().Operations -- cgit