From 74e91144105790cc997c1d79a7f638e1e3a1f3f8 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 24 Jan 2020 00:30:13 +0100 Subject: more more wip --- bridge/github/export_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bridge/github/export_test.go') diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go index 5a0bc653..d2cfb1f9 100644 --- a/bridge/github/export_test.go +++ b/bridge/github/export_test.go @@ -176,7 +176,7 @@ func TestPushPull(t *testing.T) { return deleteRepository(projectName, envUser, envToken) }) - token := auth.NewToken(author.Id(), envToken, target) + token := auth.NewToken(envToken, target) err = auth.Store(repo, token) require.NoError(t, err) -- cgit From f515b9a1291ddd3e4fe1b43bf5891ab19569e33f Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 4 Feb 2020 00:25:27 +0100 Subject: gitlab also compile --- bridge/github/export_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bridge/github/export_test.go') diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go index d2cfb1f9..cb6bacc1 100644 --- a/bridge/github/export_test.go +++ b/bridge/github/export_test.go @@ -144,8 +144,10 @@ func TestPushPull(t *testing.T) { require.NoError(t, err) // set author identity + login := "identity-test" author, err := backend.NewIdentity("test identity", "test@test.org") require.NoError(t, err) + author.SetMetadata(metaKeyGithubLogin, login) err = backend.SetUserIdentity(author) require.NoError(t, err) @@ -177,6 +179,7 @@ func TestPushPull(t *testing.T) { }) token := auth.NewToken(envToken, target) + token.SetMetadata(metaKeyGithubLogin, login) err = auth.Store(repo, token) require.NoError(t, err) -- cgit From 646fd681ffba59d4a74ec3d99558d2ed70b0106b Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 4 Feb 2020 22:05:34 +0100 Subject: it compiles \o/ --- bridge/github/export_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bridge/github/export_test.go') diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go index cb6bacc1..89040d8f 100644 --- a/bridge/github/export_test.go +++ b/bridge/github/export_test.go @@ -179,7 +179,7 @@ func TestPushPull(t *testing.T) { }) token := auth.NewToken(envToken, target) - token.SetMetadata(metaKeyGithubLogin, login) + token.SetMetadata(auth.MetaKeyLogin, login) err = auth.Store(repo, token) require.NoError(t, err) -- cgit From 2e7ac569ad3146e5fa22907d8a4e63d2a524533b Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 8 Feb 2020 17:35:35 +0100 Subject: fix tests ? --- bridge/github/export_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bridge/github/export_test.go') diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go index 89040d8f..36d43173 100644 --- a/bridge/github/export_test.go +++ b/bridge/github/export_test.go @@ -155,6 +155,11 @@ func TestPushPull(t *testing.T) { defer backend.Close() interrupt.RegisterCleaner(backend.Close) + token := auth.NewToken(envToken, target) + token.SetMetadata(auth.MetaKeyLogin, login) + err = auth.Store(repo, token) + require.NoError(t, err) + tests := testCases(t, backend) // generate project name @@ -178,11 +183,6 @@ func TestPushPull(t *testing.T) { return deleteRepository(projectName, envUser, envToken) }) - token := auth.NewToken(envToken, target) - token.SetMetadata(auth.MetaKeyLogin, login) - err = auth.Store(repo, token) - require.NoError(t, err) - // initialize exporter exporter := &githubExporter{} err = exporter.Init(backend, core.Configuration{ @@ -258,7 +258,7 @@ func TestPushPull(t *testing.T) { // verify bug have same number of original operations require.Len(t, importedBug.Snapshot().Operations, tt.numOrOp) - // verify bugs are taged with origin=github + // verify bugs are tagged with origin=github issueOrigin, ok := importedBug.Snapshot().GetCreateMetadata(core.MetaKeyOrigin) require.True(t, ok) require.Equal(t, issueOrigin, target) -- cgit From bef35d4c679de81a214c99a30916fa7ebfc3f6a8 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Sat, 8 Feb 2020 22:05:13 +0100 Subject: bridge: hopefully fix tests --- bridge/github/export_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bridge/github/export_test.go') diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go index 36d43173..7d6e6fb1 100644 --- a/bridge/github/export_test.go +++ b/bridge/github/export_test.go @@ -148,6 +148,8 @@ func TestPushPull(t *testing.T) { author, err := backend.NewIdentity("test identity", "test@test.org") require.NoError(t, err) author.SetMetadata(metaKeyGithubLogin, login) + err = author.Commit() + require.NoError(t, err) err = backend.SetUserIdentity(author) require.NoError(t, err) -- cgit