(t *testing.T)
| 755 | } |
| 756 | |
| 757 | func TestDefaultHostWorksRightAfterMigration(t *testing.T) { |
| 758 | // Given we have logged in before migration to an enterprise host |
| 759 | authCfg := newTestAuthConfig(t) |
| 760 | _, err := preMigrationLogin(authCfg, "ghe.io", "test-user", "test-token", "ssh", false) |
| 761 | require.NoError(t, err) |
| 762 | |
| 763 | // When we migrate |
| 764 | var m migration.MultiAccountDeprecated |
| 765 | c := cfg{cfg: authCfg.cfg} |
| 766 | require.NoError(t, c.Migrate(m)) |
| 767 | |
| 768 | // Then the default host is still the enterprise host |
| 769 | defaultHost, source := authCfg.DefaultHost() |
| 770 | require.Equal(t, "ghe.io", defaultHost) |
| 771 | require.Equal(t, hostsKey, source) |
| 772 | } |
| 773 | |
| 774 | func TestTokenWorksRightAfterMigration(t *testing.T) { |
| 775 | // Given we have logged in before migration |
nothing calls this directly
no test coverage detected