@ -50,19 +50,19 @@ func TestBleveSearchIssues(t *testing.T) {
time . Sleep ( 5 * time . Second )
ids , err := SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "issue2" )
ids , err := SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "issue2" , "" )
assert . NoError ( t , err )
assert . EqualValues ( t , [ ] int64 { 2 } , ids )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "first" )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "first" , "" )
assert . NoError ( t , err )
assert . EqualValues ( t , [ ] int64 { 1 } , ids )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "for" )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "for" , "" )
assert . NoError ( t , err )
assert . ElementsMatch ( t , [ ] int64 { 1 , 2 , 3 , 5 , 11 } , ids )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "good" )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "good" , "" )
assert . NoError ( t , err )
assert . EqualValues ( t , [ ] int64 { 1 } , ids )
}
@ -73,19 +73,19 @@ func TestDBSearchIssues(t *testing.T) {
setting . Indexer . IssueType = "db"
InitIssueIndexer ( true )
ids , err := SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "issue2" )
ids , err := SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "issue2" , "" )
assert . NoError ( t , err )
assert . EqualValues ( t , [ ] int64 { 2 } , ids )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "first" )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "first" , "" )
assert . NoError ( t , err )
assert . EqualValues ( t , [ ] int64 { 1 } , ids )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "for" )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "for" , "" )
assert . NoError ( t , err )
assert . ElementsMatch ( t , [ ] int64 { 1 , 2 , 3 , 5 , 11 } , ids )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "good" )
ids , err = SearchIssuesByKeyword ( context . TODO ( ) , [ ] int64 { 1 } , "good" , "" )
assert . NoError ( t , err )
assert . EqualValues ( t , [ ] int64 { 1 } , ids )
}