From daa2d6b1c40354ecce0e48e6c5ee686efe642c4b Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sun, 18 Mar 2018 22:31:10 -0400 Subject: fix all the tests --- .circleci/config.yml | 4 ++-- Bugzilla/Install/Filesystem.pm | 1 + Bugzilla/Product.pm | 11 ----------- Bugzilla/Template.pm | 2 +- Bugzilla/WebService/Constants.pm | 1 - .../BMO/template/en/default/bug/create/create-mozpr.html.tmpl | 2 +- .../template/en/default/bug/create/create-poweredby.html.tmpl | 2 +- .../BMO/template/en/default/pages/bug-writing.html.tmpl | 2 +- .../BMO/template/en/default/pages/group_admins.html.tmpl | 2 +- .../BugModal/template/en/default/bug_modal/edit.html.tmpl | 2 +- extensions/SecureMail/disabled | 0 mod_perl.pl | 2 +- scripts/entrypoint.pl | 9 +++++++-- template/en/default/attachment/create.html.tmpl | 4 ++-- template/en/default/global/user-error.html.tmpl | 5 ----- 15 files changed, 19 insertions(+), 30 deletions(-) delete mode 100644 extensions/SecureMail/disabled 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 < { 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() { - +
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.

- + 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 %] - [% IF group.owner.login == Bugzilla.params.nobody_user %] + [% IF group.owner.login == Param('nobody_user') %] – [% 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 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'); If you want to assign this [% terms.bug %] to yourself, check the box below.
- [% 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 %] [% 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', -- cgit v1.2.3-24-g4f1b