From f1be129d75c56a168a1519674f7c3ccd429af01b Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Mon, 19 Aug 2019 13:50:48 +0200 Subject: bridge/gitlab: rebase and correct exporter --- bridge/gitlab/export_test.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bridge/gitlab/export_test.go') 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 { -- cgit