diff options
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/github/export_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go index 2ebe9622..b7511a3d 100644 --- a/bridge/github/export_test.go +++ b/bridge/github/export_test.go @@ -158,11 +158,18 @@ func TestGithubPushPull(t *testing.T) { defer backend.Close() interrupt.RegisterCleaner(backend.Close) + // Setup token + cleanup token := auth.NewToken(target, envToken) token.SetMetadata(auth.MetaKeyLogin, login) err = auth.Store(repo, token) require.NoError(t, err) + cleanToken := func() error { + return auth.Remove(repo, token.ID()) + } + defer cleanToken() + interrupt.RegisterCleaner(cleanToken) + tests := testCases(t, backend) // generate project name |