summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-03-19 03:31:10 +0100
committerGitHub <noreply@github.com>2018-03-19 03:31:10 +0100
commitdaa2d6b1c40354ecce0e48e6c5ee686efe642c4b (patch)
treedc0781d54354999b4416d3b8ec5696112107bc05
parent459ebf9cca578dc1d88f13da3a4fd0499cb7f2f8 (diff)
downloadbugzilla-daa2d6b1c40354ecce0e48e6c5ee686efe642c4b.tar.gz
bugzilla-daa2d6b1c40354ecce0e48e6c5ee686efe642c4b.tar.xz
fix all the tests
-rw-r--r--.circleci/config.yml4
-rw-r--r--Bugzilla/Install/Filesystem.pm1
-rw-r--r--Bugzilla/Product.pm11
-rw-r--r--Bugzilla/Template.pm2
-rw-r--r--Bugzilla/WebService/Constants.pm1
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/pages/bug-writing.html.tmpl2
-rw-r--r--extensions/BMO/template/en/default/pages/group_admins.html.tmpl2
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl2
-rw-r--r--extensions/SecureMail/disabled0
-rw-r--r--mod_perl.pl2
-rwxr-xr-xscripts/entrypoint.pl9
-rw-r--r--template/en/default/attachment/create.html.tmpl4
-rw-r--r--template/en/default/global/user-error.html.tmpl5
15 files changed, 19 insertions, 30 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 44cd514af..3ed28133d 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -65,7 +65,7 @@ defaults:
command: |
mv /opt/bmo/local /app/local
perl -MSys::Hostname -i -pE 's/bmo.test/hostname() . ":$ENV{PORT}"/ges' $BZ_QA_CONF_FILE
- perl checksetup.pl --no-database --default-localconfig
+ /app/scripts/entrypoint.pl checksetup_gen_files --default-localconfig
mkdir artifacts
jobs:
@@ -171,7 +171,7 @@ jobs:
- checkout
- run: |
mv /opt/bmo/local /app/local
- perl checksetup.pl --no-database
+ /app/scripts/entrypoint.pl checksetup_gen_files
/app/scripts/entrypoint.pl load_test_data
mkdir artifacts
- run: /app/scripts/entrypoint.pl test_bmo -q -f t/bmo/*.t
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm
index eb750254b..08b824cad 100644
--- a/Bugzilla/Install/Filesystem.pm
+++ b/Bugzilla/Install/Filesystem.pm
@@ -117,6 +117,7 @@ sub HTTPD_ENV_CONF {
sub _error_page {
my ($code, $title, $description) = @_;
+ warn "urlbase: ", Bugzilla->urlbase, "\n";
my $host = Bugzilla->urlbase->host;
return <<EOT;
diff --git a/Bugzilla/Product.pm b/Bugzilla/Product.pm
index c4c147a63..3ac1692f0 100644
--- a/Bugzilla/Product.pm
+++ b/Bugzilla/Product.pm
@@ -64,7 +64,6 @@ use constant VALIDATORS => {
description => \&_check_description,
version => \&_check_version,
defaultmilestone => \&_check_default_milestone,
- security_group_id => \&_check_security_group_id,
isactive => \&Bugzilla::Object::check_boolean,
create_series => \&Bugzilla::Object::check_boolean
};
@@ -390,16 +389,6 @@ sub _check_version {
return $version;
}
-sub _check_security_group_id {
- my ($invocant, $id) = @_;
-
- $id = trim($id);
-
- ThrowUserError('product_must_have_security_group') unless $id;
-
- return $id;
-}
-
sub _check_default_milestone {
my ($invocant, $milestone) = @_;
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 31c68bbed..2ec813303 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -570,7 +570,7 @@ sub create {
# if a packager has modified bz_locations() to contain absolute
# paths.
ABSOLUTE => 1,
- RELATIVE => 0,
+ RELATIVE => 1,
COMPILE_DIR => bz_locations()->{'template_cache'},
diff --git a/Bugzilla/WebService/Constants.pm b/Bugzilla/WebService/Constants.pm
index e43918a43..93fddfc2b 100644
--- a/Bugzilla/WebService/Constants.pm
+++ b/Bugzilla/WebService/Constants.pm
@@ -184,7 +184,6 @@ use constant WS_ERROR_CODE => {
product_must_have_description => 703,
product_must_have_version => 704,
product_must_define_defaultmilestone => 705,
- product_must_have_security_group => 706,
# Group errors are 800-900
empty_group_name => 800,
diff --git a/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl
index a3862ab20..0bd1c94d7 100644
--- a/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-mozpr.html.tmpl
@@ -297,7 +297,7 @@ function validate_form() {
<input type="hidden" name="version" value="unspecified">
<input type="hidden" name="bug_severity" value="normal">
<input type="hidden" name="group" value="pr-private">
-<input type="hidden" name="assigned_to" id="assigned_to" value="[% Bugzilla.params.nobody_user %]">
+<input type="hidden" name="assigned_to" id="assigned_to" value="[% Param('nobody_user') FILTER html %]">
<input type="hidden" name="token" value="[% token FILTER html %]">
<div class="head">
diff --git a/extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl
index 2b7be5c75..9c0c4780d 100644
--- a/extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-poweredby.html.tmpl
@@ -43,7 +43,7 @@ please provide some information about your application or product.</p>
<input type="hidden" name="priority" value="--">
<input type="hidden" name="op_sys" value="Other">
<input type="hidden" name="version" value="unspecified">
- <input type="hidden" name="assigned_to" value="[% Bugzilla.params.nobody_user %]">
+ <input type="hidden" name="assigned_to" value="[% Param('nobody_user') FILTER html %]">
<input type="hidden" name="cc" value="liz@mozilla.com">
<input type="hidden" name="groups" value="marketing-private">
<input type="hidden" name="token" value="[% token FILTER html %]">
diff --git a/extensions/BMO/template/en/default/pages/bug-writing.html.tmpl b/extensions/BMO/template/en/default/pages/bug-writing.html.tmpl
index a6b9a5f44..dc253ee03 100644
--- a/extensions/BMO/template/en/default/pages/bug-writing.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/bug-writing.html.tmpl
@@ -7,5 +7,5 @@
#%]
[% PROCESS global/redirect.html.tmpl
- url = "[% terms.BugWritingGuidelinesURL %]"
+ url = terms.BugWritingGuidelinesURL
%]
diff --git a/extensions/BMO/template/en/default/pages/group_admins.html.tmpl b/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
index 737b070de..838a1e84a 100644
--- a/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
+++ b/extensions/BMO/template/en/default/pages/group_admins.html.tmpl
@@ -39,7 +39,7 @@
[% group.name FILTER html %]</span>
</td>
<td nowrap>
- [% IF group.owner.login == Bugzilla.params.nobody_user %]
+ [% IF group.owner.login == Param('nobody_user') %]
&ndash;
[% ELSE %]
[% INCLUDE global/user.html.tmpl who = group.owner %]
diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
index 0b36c7d12..48c2c1803 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -19,7 +19,7 @@
# these are used in a few places
is_cced = bug.cc.contains(user.login);
- unassigned = (bug.assigned_to.login == Bugzilla.params.nobody_user)
+ unassigned = (bug.assigned_to.login == Param('nobody_user'))
|| (bug.assigned_to.login.search('\.bugs$'));
# custom fields that have custom rendering, or should not be rendered
diff --git a/extensions/SecureMail/disabled b/extensions/SecureMail/disabled
deleted file mode 100644
index e69de29bb..000000000
--- a/extensions/SecureMail/disabled
+++ /dev/null
diff --git a/mod_perl.pl b/mod_perl.pl
index af60bb359..3221af19f 100644
--- a/mod_perl.pl
+++ b/mod_perl.pl
@@ -174,7 +174,7 @@ sub handler : method {
DB::disable_profile();
DB::finish_profile();
}
- warn "[request_time] ", Bugzilla->cgi->request_uri, " took ", Time::HiRes::time() - $start, " seconds to execute";
+ #warn "[request_time] ", Bugzilla->cgi->request_uri, " took ", Time::HiRes::time() - $start, " seconds to execute";
# When returning data from the REST api we must only return 200 or 304,
# which tells Apache not to append its error html documents to the
diff --git a/scripts/entrypoint.pl b/scripts/entrypoint.pl
index 23578e257..d5612dd85 100755
--- a/scripts/entrypoint.pl
+++ b/scripts/entrypoint.pl
@@ -103,6 +103,11 @@ sub cmd_dev_httpd {
exit $httpd_exit_f->get;
}
+sub cmd_checksetup_gen_files {
+ my (@args) = @_;
+ run( 'perl', 'checksetup.pl', '--no-database', @args);
+}
+
sub cmd_checksetup {
check_data_dir();
wait_for_db();
@@ -133,7 +138,7 @@ sub cmd_test_webservices {
check_data_dir();
copy_qa_extension();
assert_database()->get;
- my $httpd_exit_f = run_cereal_and_httpd('-DHTTPD_IN_SUBDIR', '-DACCESS_LOGS');
+ my $httpd_exit_f = run_cereal_and_httpd('-DHTTPD_IN_SUBDIR');
my $prove_exit_f = run_prove(
httpd_url => $conf->{browser_url},
prove_cmd => [
@@ -187,7 +192,7 @@ sub cmd_test_bmo {
$ENV{BZ_TEST_NEWBIE2} = 'newbie2@mozilla.example';
$ENV{BZ_TEST_NEWBIE2_PASS} = 'captain.space.pants.time.lord';
- my $httpd_exit_f = run_cereal_and_httpd('-DACCESS_LOGS');
+ my $httpd_exit_f = run_cereal_and_httpd();
my $prove_exit_f = run_prove(
httpd_url => $ENV{BZ_BASE_URL},
prove_cmd => [ 'prove', '-I/app', '-I/app/local/lib/perl5', @prove_args ],
diff --git a/template/en/default/attachment/create.html.tmpl b/template/en/default/attachment/create.html.tmpl
index 312e87a33..7006448d3 100644
--- a/template/en/default/attachment/create.html.tmpl
+++ b/template/en/default/attachment/create.html.tmpl
@@ -83,14 +83,14 @@ TUI_hide_default('attachment_text_field');
<td>
<em>If you want to assign this [% terms.bug %] to yourself,
check the box below.</em><br>
- [% IF bug.assigned_to.login == Bugzilla.params.nobody_user || bug.assigned_to.login.search('.bugs$') %]
+ [% IF bug.assigned_to.login == Param('nobody_user') || bug.assigned_to.login.search('.bugs$') %]
[% take_if_patch = 1 %]
[% END %]
<input type="checkbox" id="takebug" name="takebug" value="1" [% IF take_if_patch %] data-take-if-patch="1" [% END %]>
<label for="takebug">take [% terms.bug %]</label>
[% bug_statuses = [] %]
[% FOREACH bug_status = bug.status.can_change_to %]
- [% NEXT IF bug_status.name == "UNCONFIRMED"
+ [% NEXT IF bug_status.name == "UNCONFIRMED"
&& !bug.product_obj.allows_unconfirmed %]
[% bug_statuses.push(bug_status) IF bug_status.is_open %]
[% END %]
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index 1ee33dd89..c6efb5649 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -1605,11 +1605,6 @@
[% admindocslinks = {'products.html' => 'Administering products'} %]
You must enter a description for this product.
- [% ELSIF error == "product_must_have_security_group" %]
- [% title = "Product needs Security Group" %]
- [% admindocslinks = {'products.html' => 'Administering products'} %]
- You must enter a default security group for this product.
-
[% ELSIF error == "product_must_have_version" %]
[% title = "Product needs Version" %]
[% admindocslinks = {'products.html' => 'Administering products',