Post migration tests
(t *testing.T)
| 686 | // Post migration tests |
| 687 | |
| 688 | func TestUserWorksRightAfterMigration(t *testing.T) { |
| 689 | // Given we have logged in before migration |
| 690 | authCfg := newTestAuthConfig(t) |
| 691 | _, err := preMigrationLogin(authCfg, "github.com", "test-user", "test-token", "ssh", false) |
| 692 | require.NoError(t, err) |
| 693 | |
| 694 | // When we migrate |
| 695 | var m migration.MultiAccount |
| 696 | c := cfg{authCfg.cfg} |
| 697 | require.NoError(t, c.Migrate(m)) |
| 698 | |
| 699 | // Then we can still get the user correctly |
| 700 | user, err := authCfg.ActiveUser("github.com") |
| 701 | require.NoError(t, err) |
| 702 | require.Equal(t, "test-user", user) |
| 703 | } |
| 704 | |
| 705 | func TestGitProtocolWorksRightAfterMigration(t *testing.T) { |
| 706 | // Given we have logged in before migration with a non-default git protocol |
nothing calls this directly
no test coverage detected