(t *testing.T)
| 914 | } |
| 915 | |
| 916 | func TestLoginPostMigrationSetsGitProtocol(t *testing.T) { |
| 917 | // Given we have logged in after migration |
| 918 | authCfg := newTestAuthConfig(t) |
| 919 | |
| 920 | var m migration.MultiAccountDeprecated |
| 921 | c := cfg{cfg: authCfg.cfg} |
| 922 | require.NoError(t, c.Migrate(m)) |
| 923 | |
| 924 | _, err := authCfg.Login("github.com", "test-user", "test-token", "ssh", false) |
| 925 | require.NoError(t, err) |
| 926 | |
| 927 | // When we get the host git protocol |
| 928 | hostProtocol, err := authCfg.cfg.Get([]string{hostsKey, "github.com", gitProtocolKey}) |
| 929 | require.NoError(t, err) |
| 930 | |
| 931 | // Then it returns the git protocol we provided on login |
| 932 | require.Equal(t, "ssh", hostProtocol) |
| 933 | } |
| 934 | |
| 935 | func TestLoginPostMigrationSetsUser(t *testing.T) { |
| 936 | // Given we have logged in after migration |
nothing calls this directly
no test coverage detected