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