diff options
author | Michael Muré <batolettre@gmail.com> | 2022-12-22 23:19:31 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2022-12-23 01:41:03 +0100 |
commit | 95911100823b5c809225d664de74ad2d64e91972 (patch) | |
tree | c352848904d82b046646b4074f26b0ce5235fa40 /bridge/github | |
parent | d65e8837aa7bb1a6abb6892b9f2664e1b7edb02e (diff) | |
download | git-bug-95911100823b5c809225d664de74ad2d64e91972.tar.gz |
cache: fix some bugs after refactor
Diffstat (limited to 'bridge/github')
-rw-r--r-- | bridge/github/export_test.go | 10 | ||||
-rw-r--r-- | bridge/github/import_integration_test.go | 6 | ||||
-rw-r--r-- | bridge/github/import_test.go | 5 |
3 files changed, 5 insertions, 16 deletions
diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go index a2dbf7de..00d3c176 100644 --- a/bridge/github/export_test.go +++ b/bridge/github/export_test.go @@ -141,11 +141,8 @@ func TestGithubPushPull(t *testing.T) { // create repo backend repo := repository.CreateGoGitTestRepo(t, false) - backend, events, err := cache.NewRepoCache(repo) + backend, err := cache.NewRepoCacheNoEvents(repo) require.NoError(t, err) - for event := range events { - require.NoError(t, event.Err) - } // set author identity login := "identity-test" @@ -220,11 +217,8 @@ func TestGithubPushPull(t *testing.T) { repoTwo := repository.CreateGoGitTestRepo(t, false) // create a second backend - backendTwo, events, err := cache.NewRepoCache(repoTwo) + backendTwo, err := cache.NewRepoCacheNoEvents(repoTwo) require.NoError(t, err) - for event := range events { - require.NoError(t, event.Err) - } importer := &githubImporter{} err = importer.Init(ctx, backend, core.Configuration{ diff --git a/bridge/github/import_integration_test.go b/bridge/github/import_integration_test.go index 6a41517c..8c411d8d 100644 --- a/bridge/github/import_integration_test.go +++ b/bridge/github/import_integration_test.go @@ -34,11 +34,9 @@ func TestGithubImporterIntegration(t *testing.T) { // arrange repo := repository.CreateGoGitTestRepo(t, false) - backend, buildEvents, err := cache.NewRepoCache(repo) + backend, err := cache.NewRepoCacheNoEvents(repo) require.NoError(t, err) - for event := range buildEvents { - require.NoError(t, event.Err) - } + defer backend.Close() interrupt.RegisterCleaner(backend.Close) require.NoError(t, err) diff --git a/bridge/github/import_test.go b/bridge/github/import_test.go index 6539a52f..5fafcce1 100644 --- a/bridge/github/import_test.go +++ b/bridge/github/import_test.go @@ -28,11 +28,8 @@ func TestGithubImporter(t *testing.T) { repo := repository.CreateGoGitTestRepo(t, false) - backend, buildEvents, err := cache.NewRepoCache(repo) + backend, err := cache.NewRepoCacheNoEvents(repo) require.NoError(t, err) - for event := range buildEvents { - require.NoError(t, event.Err) - } defer backend.Close() interrupt.RegisterCleaner(backend.Close) |