diff options
author | Amine Hilaly <hilalyamine@gmail.com> | 2019-08-19 13:50:48 +0200 |
---|---|---|
committer | Amine Hilaly <hilalyamine@gmail.com> | 2019-08-19 13:50:48 +0200 |
commit | f1be129d75c56a168a1519674f7c3ccd429af01b (patch) | |
tree | aeec5a1736f936fa4631aacc142bcfbf956b51b5 /bridge/gitlab/export_test.go | |
parent | c7e932e5a95816402248ba8c36ab8d631fdc9232 (diff) | |
download | git-bug-f1be129d75c56a168a1519674f7c3ccd429af01b.tar.gz |
bridge/gitlab: rebase and correct exporter
Diffstat (limited to 'bridge/gitlab/export_test.go')
-rw-r--r-- | bridge/gitlab/export_test.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bridge/gitlab/export_test.go b/bridge/gitlab/export_test.go index 43403361..f7a99610 100644 --- a/bridge/gitlab/export_test.go +++ b/bridge/gitlab/export_test.go @@ -174,13 +174,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) @@ -202,9 +203,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 { |