@@ -12,7 +12,7 @@ import (
1212 "github.com/stretchr/testify/require"
1313)
1414
15- func TestMigration (t * testing.T ) {
15+ func TestMultiAccountDeprecatedMigration (t * testing.T ) {
1616 cfg := config .ReadFromString (`
1717hosts:
1818 github.com:
2525 git_protocol: https
2626` )
2727
28- var m migration.MultiAccount
28+ var m migration.MultiAccountDeprecated
2929 require .NoError (t , m .Do (cfg ))
3030
3131 // First we'll check that the oauth tokens have been moved to their new locations
6060 require .NoError (t , keyring .Set ("gh:github.com" , "" , userOneToken ))
6161 require .NoError (t , keyring .Set ("gh:enterprise.com" , "" , userTwoToken ))
6262
63- var m migration.MultiAccount
63+ var m migration.MultiAccountDeprecated
6464 require .NoError (t , m .Do (cfg ))
6565
6666 // Verify token gets stored with host and username
@@ -96,19 +96,19 @@ hosts:
9696}
9797
9898func TestPreVersionIsEmptyString (t * testing.T ) {
99- var m migration.MultiAccount
99+ var m migration.MultiAccountDeprecated
100100 require .Equal (t , "" , m .PreVersion ())
101101}
102102
103103func TestPostVersion (t * testing.T ) {
104- var m migration.MultiAccount
104+ var m migration.MultiAccountDeprecated
105105 require .Equal (t , "1" , m .PostVersion ())
106106}
107107
108108func TestMigrationReturnsSuccessfullyWhenNoHostsEntry (t * testing.T ) {
109109 cfg := config .ReadFromString (`` )
110110
111- var m migration.MultiAccount
111+ var m migration.MultiAccountDeprecated
112112 require .NoError (t , m .Do (cfg ))
113113}
114114
@@ -117,7 +117,7 @@ func TestMigrationReturnsSuccessfullyWhenEmptyHosts(t *testing.T) {
117117hosts:
118118` )
119119
120- var m migration.MultiAccount
120+ var m migration.MultiAccountDeprecated
121121 require .NoError (t , m .Do (cfg ))
122122}
123123
@@ -142,7 +142,7 @@ hosts:
142142 httpmock .StringResponse (`{"data":{"viewer":{"login":"monalisa"}}}` ),
143143 )
144144
145- m := migration.MultiAccount {Transport : reg }
145+ m := migration.MultiAccountDeprecated {Transport : reg }
146146 require .NoError (t , m .Do (cfg ))
147147
148148 require .Equal (t , fmt .Sprintf ("token %s" , token ), reg .Requests [0 ].Header .Get ("Authorization" ))
@@ -182,7 +182,7 @@ hosts:
182182 httpmock .StringResponse (`{"data":{"viewer":{"login":"monalisa"}}}` ),
183183 )
184184
185- m := migration.MultiAccount {Transport : reg }
185+ m := migration.MultiAccountDeprecated {Transport : reg }
186186 require .NoError (t , m .Do (cfg ))
187187
188188 require .Equal (t , "token test-token" , reg .Requests [0 ].Header .Get ("Authorization" ))
@@ -201,7 +201,7 @@ hosts:
201201 git_protocol: ssh
202202` )
203203
204- m := migration.MultiAccount {}
204+ m := migration.MultiAccountDeprecated {}
205205 require .NoError (t , m .Do (cfg ))
206206
207207 requireNoKey (t , cfg , []string {"hosts" , "github.com" })
@@ -218,7 +218,7 @@ hosts:
218218 git_protocol: ssh
219219` )
220220
221- m := migration.MultiAccount {}
221+ m := migration.MultiAccountDeprecated {}
222222 err := m .Do (cfg )
223223
224224 require .ErrorContains (t , err , `couldn't find oauth token for "github.com": keyring test error` )
0 commit comments