(t *testing.T)
| 739 | } |
| 740 | |
| 741 | func TestHostsWorksRightAfterMigration(t *testing.T) { |
| 742 | // Given we have logged in before migration |
| 743 | authCfg := newTestAuthConfig(t) |
| 744 | _, err := preMigrationLogin(authCfg, "ghe.io", "test-user", "test-token", "ssh", false) |
| 745 | require.NoError(t, err) |
| 746 | |
| 747 | // When we migrate |
| 748 | var m migration.MultiAccountDeprecated |
| 749 | c := cfg{cfg: authCfg.cfg} |
| 750 | require.NoError(t, c.Migrate(m)) |
| 751 | |
| 752 | // Then we can still get the hosts correctly |
| 753 | hosts := authCfg.Hosts() |
| 754 | require.Contains(t, hosts, "ghe.io") |
| 755 | } |
| 756 | |
| 757 | func TestDefaultHostWorksRightAfterMigration(t *testing.T) { |
| 758 | // Given we have logged in before migration to an enterprise host |
nothing calls this directly
no test coverage detected