Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
69d45d10
Commit
69d45d10
authored
Oct 03, 2010
by
Max Kanat-Alexander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 601499 - Make xt/search.t test the email(n)* search query parameters
r=mkanat, a=mkanat (module owner)
parent
fcc00da4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
Constants.pm
xt/lib/Bugzilla/Test/Search/Constants.pm
+13
-1
FieldTestNormal.pm
xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm
+13
-0
No files found.
xt/lib/Bugzilla/Test/Search/Constants.pm
View file @
69d45d10
...
...
@@ -28,6 +28,7 @@
package
Bugzilla::Test::Search::
Constants
;
use
base
qw(Exporter)
;
use
Bugzilla::
Constants
;
use
Bugzilla::
Util
qw(generate_random_password)
;
our
@EXPORT
=
qw(
ATTACHMENT_FIELDS
...
...
@@ -146,12 +147,13 @@ use constant OR_SKIP => qw(
# All the fields that represent users.
use
constant
USER_FIELDS
=>
qw(
assigned_to
cc
reporter
qa_contact
commenter
attachments.submitter
setters.login_name
requestees.login_name
cc
requestees.login_name
)
;
# For the "substr"-type searches, how short of a substring should
...
...
@@ -1256,6 +1258,16 @@ use constant SPECIAL_PARAM_TESTS => (
contains
=>
[
1
,
2
,
3
,
4
]
},
{
field
=>
'bug_status'
,
operator
=>
'anyexact'
,
value
=>
'__all__'
,
contains
=>
[
1
,
2
,
3
,
4
,
5
]
},
{
field
=>
'assigned_to'
,
operator
=>
'anyexact'
,
value
=>
'<1>, <2-reporter>'
,
contains
=>
[
1
,
2
],
extra_params
=>
{
emailreporter1
=>
1
}
},
{
field
=>
'assigned_to'
,
operator
=>
'equals'
,
value
=>
'<1>'
,
extra_name
=>
'email2'
,
contains
=>
[]
,
extra_params
=>
{
email2
=>
generate_random_password
(
100
),
emaillongdesc2
=>
1
,
},
}
);
1
;
xt/lib/Bugzilla/Test/Search/FieldTestNormal.pm
View file @
69d45d10
...
...
@@ -34,6 +34,8 @@ use constant CH_OPERATOR => {
changedto
=>
'chfieldvalue'
,
};
use
constant
EMAIL_FIELDS
=>
qw(assigned_to qa_contact cc reporter commenter)
;
# Normally, we just clone a FieldTest because that's the best for performance,
# overall--that way we don't have to translate the value again. However,
# sometimes (like in Bugzilla::Test::Search's direct code) we just want
...
...
@@ -79,6 +81,17 @@ sub search_params {
return
{
deadlineto
=>
$value
};
}
if
(
grep
{
$_
eq
$field
}
EMAIL_FIELDS
)
{
$field
=
'longdesc'
if
$field
eq
'commenter'
;
return
{
email1
=>
$value
,
"email${field}1"
=>
1
,
emailtype1
=>
$operator
,
# Used to do extra tests on special sorts of email* combinations.
%
{
$self
->
test
->
{
extra_params
}
||
{}
},
};
}
$field
=~
s/\./_/g
;
return
{
$field
=>
$value
,
"${field}_type"
=>
$operator
};
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment