(t *testing.T)
| 722 | } |
| 723 | |
| 724 | func TestGitProtocolWorksRightAfterMigration(t *testing.T) { |
| 725 | // Given we have logged in before migration with a non-default git protocol |
| 726 | authCfg := newTestAuthConfig(t) |
| 727 | _, err := preMigrationLogin(authCfg, "github.com", "test-user", "test-token", "ssh", false) |
| 728 | require.NoError(t, err) |
| 729 | |
| 730 | // When we migrate |
| 731 | var m migration.MultiAccountDeprecated |
| 732 | c := cfg{cfg: authCfg.cfg} |
| 733 | require.NoError(t, c.Migrate(m)) |
| 734 | |
| 735 | // Then we can still get the git protocol correctly |
| 736 | gitProtocol, err := authCfg.cfg.Get([]string{hostsKey, "github.com", gitProtocolKey}) |
| 737 | require.NoError(t, err) |
| 738 | require.Equal(t, "ssh", gitProtocol) |
| 739 | } |
| 740 | |
| 741 | func TestHostsWorksRightAfterMigration(t *testing.T) { |
| 742 | // Given we have logged in before migration |
nothing calls this directly
no test coverage detected