Skip to content

Use a small size repo for migrate test #12300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions integrations/api_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@ func TestAPIRepoMigrate(t *testing.T) {
cloneURL, repoName string
expectedStatus int
}{
{ctxUserID: 1, userID: 2, cloneURL: "https://github.com/go-gitea/git.git", repoName: "git-admin", expectedStatus: http.StatusCreated},
{ctxUserID: 2, userID: 2, cloneURL: "https://github.com/go-gitea/git.git", repoName: "git-own", expectedStatus: http.StatusCreated},
{ctxUserID: 2, userID: 1, cloneURL: "https://github.com/go-gitea/git.git", repoName: "git-bad", expectedStatus: http.StatusForbidden},
{ctxUserID: 2, userID: 3, cloneURL: "https://github.com/go-gitea/git.git", repoName: "git-org", expectedStatus: http.StatusCreated},
{ctxUserID: 2, userID: 6, cloneURL: "https://github.com/go-gitea/git.git", repoName: "git-bad-org", expectedStatus: http.StatusForbidden},
{ctxUserID: 1, userID: 2, cloneURL: "https://github.com/go-gitea/test_repo.git", repoName: "git-admin", expectedStatus: http.StatusCreated},
{ctxUserID: 2, userID: 2, cloneURL: "https://github.com/go-gitea/test_repo.git", repoName: "git-own", expectedStatus: http.StatusCreated},
{ctxUserID: 2, userID: 1, cloneURL: "https://github.com/go-gitea/test_repo.git", repoName: "git-bad", expectedStatus: http.StatusForbidden},
{ctxUserID: 2, userID: 3, cloneURL: "https://github.com/go-gitea/test_repo.git", repoName: "git-org", expectedStatus: http.StatusCreated},
{ctxUserID: 2, userID: 6, cloneURL: "https://github.com/go-gitea/test_repo.git", repoName: "git-bad-org", expectedStatus: http.StatusForbidden},
}

defer prepareTestEnv(t)()
Expand Down Expand Up @@ -348,7 +348,7 @@ func testAPIRepoMigrateConflict(t *testing.T, u *url.URL) {
assert.NoError(t, err)
userID := user.ID

cloneURL := "https://github.com/go-gitea/git.git"
cloneURL := "https://github.com/go-gitea/test_repo.git"

req := NewRequestWithJSON(t, "POST", "/api/v1/repos/migrate?token="+httpContext.Token,
&api.MigrateRepoOption{
Expand Down
2 changes: 1 addition & 1 deletion integrations/repo_migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ func testRepoMigrate(t testing.TB, session *TestSession, cloneAddr, repoName str
func TestRepoMigrate(t *testing.T) {
defer prepareTestEnv(t)()
session := loginUser(t, "user2")
testRepoMigrate(t, session, "https://github.com/go-gitea/git.git", "git")
testRepoMigrate(t, session, "https://github.com/go-gitea/test_repo.git", "git")
}