Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Mar 23, 2024
1 parent 238e9f2 commit f32bb1c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/integration/repo_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package integration
import (
"net/http"
"testing"
"time"

"code.gitea.io/gitea/models/db"
repo_model "code.gitea.io/gitea/models/repo"
Expand Down Expand Up @@ -34,7 +33,6 @@ func TestSearchRepo(t *testing.T) {
assert.NoError(t, err)

code_indexer.UpdateRepoIndexer(repo)
time.Sleep(100 * time.Millisecond)

testSearch(t, "/user2/repo1/search?q=Description&page=1", []string{"README.md"})

Expand All @@ -45,12 +43,11 @@ func TestSearchRepo(t *testing.T) {
assert.NoError(t, err)

code_indexer.UpdateRepoIndexer(repo)
time.Sleep(100 * time.Millisecond)

testSearch(t, "/user2/glob/search?q=loren&page=1", []string{"a.txt"})
testSearch(t, "/user2/glob/search?q=loren&page=1&t=match", []string{"a.txt"})
testSearch(t, "/user2/glob/search?q=file3&page=1", []string{"x/b.txt", "a.txt"})
testSearch(t, "/user2/glob/search?q=file3&page=1&t=match", []string{"x/b.txt"})
testSearch(t, "/user2/glob/search?q=file3&page=1&t=match", []string{"x/b.txt", "a.txt"})
testSearch(t, "/user2/glob/search?q=file4&page=1&t=match", []string{})
testSearch(t, "/user2/glob/search?q=file5&page=1&t=match", []string{})
}
Expand Down

0 comments on commit f32bb1c

Please sign in to comment.