summaryrefslogtreecommitdiffstats
path: root/xt
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2011-03-03 20:41:35 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2011-03-03 20:41:35 +0100
commitac3fc4635663e59fd953c26d66e1b0d4f7dd7764 (patch)
tree4b718716946177992e95c438cae7ee7f99f0233d /xt
parent9785bd9b3e44af9cbd4fc37b37b5eb00a94b69ee (diff)
downloadbugzilla-ac3fc4635663e59fd953c26d66e1b0d4f7dd7764.tar.gz
bugzilla-ac3fc4635663e59fd953c26d66e1b0d4f7dd7764.tar.xz
Bug 638518: Make all boolean chart operators work with attach_data.thedata
r=mkanat, a=mkanat (module owner)
Diffstat (limited to 'xt')
-rw-r--r--xt/lib/Bugzilla/Test/Search/Constants.pm26
-rw-r--r--xt/lib/Bugzilla/Test/Search/FieldTest.pm7
2 files changed, 1 insertions, 32 deletions
diff --git a/xt/lib/Bugzilla/Test/Search/Constants.pm b/xt/lib/Bugzilla/Test/Search/Constants.pm
index 82b78bd35..a5ec6e2b1 100644
--- a/xt/lib/Bugzilla/Test/Search/Constants.pm
+++ b/xt/lib/Bugzilla/Test/Search/Constants.pm
@@ -47,7 +47,6 @@ our @EXPORT = qw(
NUM_SEARCH_TESTS
OR_BROKEN
OR_SKIP
- PG_BROKEN
SKIP_FIELDS
SPECIAL_PARAM_TESTS
SUBSTR_NO_FIELD_ADD
@@ -203,7 +202,6 @@ use constant SUBSTR_NO_FIELD_ADD => FIELD_TYPE_DATETIME, qw(
#
# requestees.login_name doesn't find bugs that fully lack requestees.
use constant NEGATIVE_BROKEN => (
- 'attach_data.thedata' => { contains => [5] },
bug_file_loc => { contains => [5] },
deadline => { contains => [5] },
# Custom fields are busted because they can be NULL.
@@ -302,19 +300,13 @@ use constant KNOWN_BROKEN => {
'allwordssubstr-<1>' => { ALLWORDS_BROKEN },
# flagtypes.name does not work here, probably because they all try to
# match against a single flag.
- # Same for attach_data.thedata.
'allwords-<1>' => {
ALLWORDS_BROKEN,
'flagtypes.name' => { contains => [1] },
},
nowordssubstr => { NOWORDS_BROKEN },
- # attach_data.thedata doesn't match properly with any of the plain
- # "words" searches. Also, bug 5 doesn't match because it lacks
- # attachments.
- nowords => {
- NOWORDS_BROKEN,
- },
+ nowords => { NOWORDS_BROKEN },
# setters.login_name and requestees.login name aren't tracked individually
# in bugs_activity, so can't be searched using this method.
@@ -387,16 +379,6 @@ use constant KNOWN_BROKEN => {
},
};
-# This tracks things that are broken in different ways on Pg compared to
-# MySQL. Actually, in some of these cases, Pg is behaving correctly
-# where MySQL isn't, but the result is still a bit surprising to the user.
-use constant PG_BROKEN => {
- 'attach_data.thedata' => {
- notregexp => { contains => [5] },
- nowords => { contains => [5] },
- },
-};
-
###################
# Broken NotTests #
###################
@@ -404,7 +386,6 @@ use constant PG_BROKEN => {
# These are fields that are broken in the same way for pretty much every
# NOT test that is broken.
use constant COMMON_BROKEN_NOT => (
- "attach_data.thedata" => { contains => [5] },
"bug_file_loc" => { contains => [5] },
"deadline" => { contains => [5] },
"flagtypes.name" => { contains => [5] },
@@ -449,7 +430,6 @@ use constant BROKEN_NOT => {
"flagtypes.name" => { contains => [1,5] },
},
'allwords-<1> <2>' => {
- 'attach_data.thedata' => { contains => [5] },
cc => { },
'flagtypes.name' => { contains => [5] },
},
@@ -467,9 +447,6 @@ use constant BROKEN_NOT => {
anywords => {
COMMON_BROKEN_NOT,
},
- 'anywords-<1> <2>' => {
- 'attach_data.thedata' => { contains => [5] },
- },
anywordssubstr => {
COMMON_BROKEN_NOT,
},
@@ -537,7 +514,6 @@ use constant BROKEN_NOT => {
},
nowordssubstr => {
NEGATIVE_BROKEN_NOT,
- "attach_data.thedata" => { },
"flagtypes.name" => { },
},
regexp => {
diff --git a/xt/lib/Bugzilla/Test/Search/FieldTest.pm b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
index 400ca3263..02e0df06c 100644
--- a/xt/lib/Bugzilla/Test/Search/FieldTest.pm
+++ b/xt/lib/Bugzilla/Test/Search/FieldTest.pm
@@ -191,13 +191,6 @@ sub _known_broken {
$value_name .= "-$extra_name";
}
- if (!$skip_pg_check and Bugzilla->dbh->isa('Bugzilla::DB::Pg')) {
- my $field_broken = PG_BROKEN->{$field}->{$operator};
- return $field_broken if $field_broken;
- my $pg_value_broken = PG_BROKEN->{$field}->{$value_name};
- return $pg_value_broken if $pg_value_broken;
- }
-
my $value_broken = $constant->{$value_name}->{$field};
$value_broken ||= $constant->{$value_name}->{$type};
return $value_broken if $value_broken;