summaryrefslogtreecommitdiffstatshomepage
path: root/bridge/github/export_test.go
diff options
context:
space:
mode:
authorAmine <hilalyamine@gmail.com>2019-08-19 00:37:54 +0200
committerGitHub <noreply@github.com>2019-08-19 00:37:54 +0200
commit36c91adddfc16b8c5d04eb66dbb4cf8c25cea321 (patch)
tree50484f3531e33c2c63c026fcb1c76f60f8b13862 /bridge/github/export_test.go
parent6428352bd14828f670206b60862de7f71c52d235 (diff)
parente6931aaf6f3173c634b03d515287e4a12fd20f15 (diff)
downloadgit-bug-36c91adddfc16b8c5d04eb66dbb4cf8c25cea321.tar.gz
git-bug-36c91adddfc16b8c5d04eb66dbb4cf8c25cea321.zip
Merge pull request #190 from MichaelMure/bridge-ctx
Bridge: pull/push enhancements
Diffstat (limited to 'bridge/github/export_test.go')
-rw-r--r--bridge/github/export_test.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go
index 107fe63b6..a0be7cff7 100644
--- a/bridge/github/export_test.go
+++ b/bridge/github/export_test.go
@@ -2,6 +2,7 @@ package github
import (
"bytes"
+ "context"
"encoding/json"
"fmt"
"math/rand"
@@ -177,13 +178,14 @@ func TestPushPull(t *testing.T) {
})
require.NoError(t, err)
+ ctx := context.Background()
start := time.Now()
// export all bugs
- events, err := exporter.ExportAll(backend, time.Time{})
+ exportEvents, err := exporter.ExportAll(ctx, backend, time.Time{})
require.NoError(t, err)
- for result := range events {
+ for result := range exportEvents {
require.NoError(t, result.Err)
}
require.NoError(t, err)
@@ -206,9 +208,13 @@ func TestPushPull(t *testing.T) {
require.NoError(t, err)
// import all exported bugs to the second backend
- err = importer.ImportAll(backendTwo, time.Time{})
+ importEvents, err := importer.ImportAll(ctx, backendTwo, time.Time{})
require.NoError(t, err)
+ for result := range importEvents {
+ require.NoError(t, result.Err)
+ }
+
require.Len(t, backendTwo.AllBugsIds(), len(tests))
for _, tt := range tests {