aboutsummaryrefslogtreecommitdiffstats
path: root/bridge
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-12-22 23:19:31 +0100
committerMichael Muré <batolettre@gmail.com>2022-12-23 01:41:03 +0100
commit95911100823b5c809225d664de74ad2d64e91972 (patch)
treec352848904d82b046646b4074f26b0ce5235fa40 /bridge
parentd65e8837aa7bb1a6abb6892b9f2664e1b7edb02e (diff)
downloadgit-bug-95911100823b5c809225d664de74ad2d64e91972.tar.gz
cache: fix some bugs after refactor
Diffstat (limited to 'bridge')
-rw-r--r--bridge/github/export_test.go10
-rw-r--r--bridge/github/import_integration_test.go6
-rw-r--r--bridge/github/import_test.go5
-rw-r--r--bridge/gitlab/export_test.go10
-rw-r--r--bridge/gitlab/import_test.go5
5 files changed, 8 insertions, 28 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)
diff --git a/bridge/gitlab/export_test.go b/bridge/gitlab/export_test.go
index 64bc43f4..7c826822 100644
--- a/bridge/gitlab/export_test.go
+++ b/bridge/gitlab/export_test.go
@@ -147,11 +147,8 @@ func TestGitlabPushPull(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 := "test-identity"
@@ -223,11 +220,8 @@ func TestGitlabPushPull(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 := &gitlabImporter{}
err = importer.Init(ctx, backend, core.Configuration{
diff --git a/bridge/gitlab/import_test.go b/bridge/gitlab/import_test.go
index ac91610d..bed93a80 100644
--- a/bridge/gitlab/import_test.go
+++ b/bridge/gitlab/import_test.go
@@ -33,11 +33,8 @@ func TestGitlabImport(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)