diff options
author | Amine <hilalyamine@gmail.com> | 2019-08-19 00:37:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-19 00:37:54 +0200 |
commit | 36c91adddfc16b8c5d04eb66dbb4cf8c25cea321 (patch) | |
tree | 50484f3531e33c2c63c026fcb1c76f60f8b13862 /bridge/gitlab/import_test.go | |
parent | 6428352bd14828f670206b60862de7f71c52d235 (diff) | |
parent | e6931aaf6f3173c634b03d515287e4a12fd20f15 (diff) | |
download | git-bug-36c91adddfc16b8c5d04eb66dbb4cf8c25cea321.tar.gz |
Merge pull request #190 from MichaelMure/bridge-ctx
Bridge: pull/push enhancements
Diffstat (limited to 'bridge/gitlab/import_test.go')
-rw-r--r-- | bridge/gitlab/import_test.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bridge/gitlab/import_test.go b/bridge/gitlab/import_test.go index c38d3ce3..20fc67c7 100644 --- a/bridge/gitlab/import_test.go +++ b/bridge/gitlab/import_test.go @@ -1,6 +1,7 @@ package gitlab import ( + "context" "fmt" "os" "testing" @@ -99,10 +100,16 @@ func TestImport(t *testing.T) { }) require.NoError(t, err) + ctx := context.Background() start := time.Now() - err = importer.ImportAll(backend, time.Time{}) + + events, err := importer.ImportAll(ctx, backend, time.Time{}) require.NoError(t, err) + for result := range events { + require.NoError(t, result.Err) + } + fmt.Printf("test repository imported in %f seconds\n", time.Since(start).Seconds()) require.Len(t, backend.AllBugsIds(), len(tests)) |