(t *testing.T)
| 736 | } |
| 737 | |
| 738 | func TestDefaultHostWorksRightAfterMigration(t *testing.T) { |
| 739 | // Given we have logged in before migration to an enterprise host |
| 740 | authCfg := newTestAuthConfig(t) |
| 741 | _, err := preMigrationLogin(authCfg, "ghe.io", "test-user", "test-token", "ssh", false) |
| 742 | require.NoError(t, err) |
| 743 | |
| 744 | // When we migrate |
| 745 | var m migration.MultiAccount |
| 746 | c := cfg{authCfg.cfg} |
| 747 | require.NoError(t, c.Migrate(m)) |
| 748 | |
| 749 | // Then the default host is still the enterprise host |
| 750 | defaultHost, source := authCfg.DefaultHost() |
| 751 | require.Equal(t, "ghe.io", defaultHost) |
| 752 | require.Equal(t, hostsKey, source) |
| 753 | } |
| 754 | |
| 755 | func TestTokenWorksRightAfterMigration(t *testing.T) { |
| 756 | // Given we have logged in before migration |
nothing calls this directly
no test coverage detected