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