From: Dylan William Hardison Date: Thu, 31 Jan 2019 20:01:13 +0000 (-0500) Subject: Bug 1524174 - remove /bmo/ prefix from test suite X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fdfbcda8fa77aa3b994aa3d3b16a778de303b36;p=thirdparty%2Fbugzilla.git Bug 1524174 - remove /bmo/ prefix from test suite --- diff --git a/.circleci/selenium_test.conf b/.circleci/selenium_test.conf index 567ea9289..978ab6f5f 100644 --- a/.circleci/selenium_test.conf +++ b/.circleci/selenium_test.conf @@ -17,7 +17,6 @@ 'port' => 4444, 'browser_url' => 'http://bmo.test', 'attachment_file' => 'https://raw.githubusercontent.com/mozilla-bteam/bmo/master/qa/config/patch.diff', - 'bugzilla_installation' => 'bmo', 'bugzilla_path' => '/app', 'test_bug_1' => 1, 'test_bug_2' => 2, diff --git a/Bugzilla/App/CGI.pm b/Bugzilla/App/CGI.pm index 53a4ba96b..732688c3e 100644 --- a/Bugzilla/App/CGI.pm +++ b/Bugzilla/App/CGI.pm @@ -131,7 +131,6 @@ sub _ENV { } my $cgi_query = Mojo::Parameters->new(%captures); $cgi_query->append($req->url->query); - my $prefix = $c->stash->{bmo_prefix} ? '/bmo/' : '/'; return ( %ENV, @@ -147,7 +146,7 @@ sub _ENV { REMOTE_PORT => $tx->remote_port, REMOTE_USER => $remote_user || '', REQUEST_METHOD => $req->method, - SCRIPT_NAME => "$prefix$script_name", + SCRIPT_NAME => "/$script_name", SERVER_NAME => hostname, SERVER_PORT => $tx->local_port, SERVER_PROTOCOL => $req->is_secure ? 'HTTPS' : 'HTTP', # TODO: Version is missing diff --git a/Bugzilla/App/Plugin/Glue.pm b/Bugzilla/App/Plugin/Glue.pm index be7d44565..9a710da73 100644 --- a/Bugzilla/App/Plugin/Glue.pm +++ b/Bugzilla/App/Plugin/Glue.pm @@ -38,13 +38,6 @@ sub register { $app->hook( before_dispatch => sub { my ($c) = @_; - if ($D{HTTPD_IN_SUBDIR}) { - my $path = $c->req->url->path; - if ($path =~ s{^/bmo}{}s) { - $c->stash->{bmo_prefix} = 1; - $c->req->url->path($path); - } - } Log::Log4perl::MDC->put(request_id => $c->req->request_id); $c->stash->{cleanup_guard} = Scope::Guard->new(\&Bugzilla::cleanup); Bugzilla->usage_mode(USAGE_MODE_MOJO); diff --git a/qa/config/selenium_test.conf b/qa/config/selenium_test.conf index 7fbfeffe3..f76afb671 100644 --- a/qa/config/selenium_test.conf +++ b/qa/config/selenium_test.conf @@ -17,7 +17,6 @@ 'port' => 4444, 'browser_url' => 'http://localhost', 'attachment_file' => 'https://raw.githubusercontent.com/mozilla-bteam/bmo/master/qa/config/patch.diff', - 'bugzilla_installation' => 'bmo', 'bugzilla_path' => '/var/www/html/bmo', 'test_bug_1' => 1, 'test_bug_2' => 2, diff --git a/qa/t/archived/test_email_preferences.t b/qa/t/archived/test_email_preferences.t index fe51ee140..6d3cb6323 100644 --- a/qa/t/archived/test_email_preferences.t +++ b/qa/t/archived/test_email_preferences.t @@ -155,7 +155,7 @@ $sel->title_is("Default Preferences"); # Set normal user Email Prefs (by directly going to Email Prefs pane) logout($sel); log_in($sel, $config, 'editbugs'); -$sel->open_ok("$config->{bugzilla_installation}/userprefs.cgi?tab=email"); +$sel->open_ok("/userprefs.cgi?tab=email"); $sel->is_text_present_ok("Email Preferences"); $sel->click_ok("//input[\@value='Enable All Bugmail']"); $sel->click_ok("email-3-1", undef, diff --git a/qa/t/lib/QA/REST.pm b/qa/t/lib/QA/REST.pm index 3d37e2277..700a65b29 100644 --- a/qa/t/lib/QA/REST.pm +++ b/qa/t/lib/QA/REST.pm @@ -30,7 +30,7 @@ sub get_rest_client { bless($rest_client, 'QA::REST'); my $config = $rest_client->{bz_config} = get_config(); $rest_client->{bz_url} - = $config->{browser_url} . '/' . $config->{bugzilla_installation} . '/rest/'; + = $config->{browser_url} . '/rest/'; $rest_client->{bz_default_headers} = {'Accept' => 'application/json', 'Content-Type' => 'application/json'}; return $rest_client; diff --git a/qa/t/lib/QA/RPC/JSONRPC.pm b/qa/t/lib/QA/RPC/JSONRPC.pm index 1e43e9eaf..3a72ada9d 100644 --- a/qa/t/lib/QA/RPC/JSONRPC.pm +++ b/qa/t/lib/QA/RPC/JSONRPC.pm @@ -66,8 +66,7 @@ sub call { my $config = $self->bz_config; my $url - = $config->{browser_url} . "/" - . $config->{bugzilla_installation} + = $config->{browser_url} . "/jsonrpc.cgi"; my $result; if ($self->bz_get_mode) { diff --git a/qa/t/lib/QA/Util.pm b/qa/t/lib/QA/Util.pm index e915b9388..410d800de 100644 --- a/qa/t/lib/QA/Util.pm +++ b/qa/t/lib/QA/Util.pm @@ -137,8 +137,7 @@ sub get_selenium { sub get_xmlrpc_client { my $config = get_config(); my $xmlrpc_url - = $config->{browser_url} . "/" - . $config->{bugzilla_installation} + = $config->{browser_url} . "/xmlrpc.cgi"; require QA::RPC::XMLRPC; @@ -172,7 +171,7 @@ sub get_rpc_clients { sub go_to_home { my ($sel, $config) = @_; - $sel->open_ok("/$config->{bugzilla_installation}/", + $sel->open_ok("/", undef, "Go to the home page"); $sel->set_speed(500); $sel->title_is("Bugzilla Main Page"); @@ -190,7 +189,7 @@ sub screenshot_page { sub log_in { my ($sel, $config, $user) = @_; - $sel->open_ok("/$config->{bugzilla_installation}/login", + $sel->open_ok("/login", undef, "Go to the home page"); $sel->title_is("Log in to Bugzilla"); $sel->type_ok( @@ -242,9 +241,7 @@ sub file_bug_in_product { if ($sel->is_text_present($product)) { ok(1, "Display the list of enterable products"); $sel->open_ok( - "/" - . $config->{bugzilla_installation} - . "/enter_bug.cgi?product=$product&format=__default__", + "/enter_bug.cgi?product=$product&format=__default__", undef, "Choose product $product" ); diff --git a/qa/t/test_bmo_enter_new_bug.t b/qa/t/test_bmo_enter_new_bug.t index b499a7fc9..3c3343292 100644 --- a/qa/t/test_bmo_enter_new_bug.t +++ b/qa/t/test_bmo_enter_new_bug.t @@ -37,7 +37,7 @@ set_parameters($sel, {"Bug Fields" => {"useclassification-off" => undef}}); # ## FIXME figure out how to use format= with file_bug_in_product # -#$sel->open_ok("/$config->{bugzilla_installation}/enter_bug.cgi?product=Marketing&format=mktgevent"); +#$sel->open_ok("/enter_bug.cgi?product=Marketing&format=mktgevent"); #$sel->wait_for_page_to_load_ok(WAIT_TIME); #$sel->title_is("Event Request Form", "Open custom bug entry form - mktgevent"); #$sel->type_ok("firstname", "Bugzilla", "Enter first name"); @@ -59,7 +59,7 @@ set_parameters($sel, {"Bug Fields" => {"useclassification-off" => undef}}); # ## swag # -#$sel->open_ok("/$config->{bugzilla_installation}/enter_bug.cgi?product=Marketing&format=swag"); +#$sel->open_ok("/enter_bug.cgi?product=Marketing&format=swag"); #$sel->wait_for_page_to_load_ok(WAIT_TIME); #$sel->title_is("Swag Request Form", "Open custom bug entry form - swag"); #$sel->type_ok("firstname", "Bugzilla", "Enter first name"); @@ -91,7 +91,7 @@ _check_component('Marketing', 'Trademark Permissions'); _check_group('marketing-private'); $sel->open_ok( - "/$config->{bugzilla_installation}/enter_bug.cgi?product=Marketing&format=trademark" + "/enter_bug.cgi?product=Marketing&format=trademark" ); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Trademark Usage Requests", @@ -116,7 +116,7 @@ _check_component('Infrastructure & Operations', 'WebOps: Other'); _check_version('Infrastructure & Operations', 'other'); _check_group('infra'); -#$sel->open_ok("/$config->{bugzilla_installation}/enter_bug.cgi?product=mozilla.org&format=itrequest"); +#$sel->open_ok("/enter_bug.cgi?product=mozilla.org&format=itrequest"); #$sel->wait_for_page_to_load_ok(WAIT_TIME); #$sel->title_is("Mozilla Corporation/Foundation IT Requests", "Open custom bug entry form - itrequest"); #$sel->click_ok("component_webops_other", "Select request type"); @@ -130,7 +130,7 @@ _check_group('infra'); # brownbag -#$sel->open_ok("/$config->{bugzilla_installation}/enter_bug.cgi?product=mozilla.org&format=brownbag"); +#$sel->open_ok("/enter_bug.cgi?product=mozilla.org&format=brownbag"); #$sel->wait_for_page_to_load_ok(WAIT_TIME); #$sel->title_is("Mozilla Corporation Brownbag Requests", "Open custom bug entry form - brownbag"); #$sel->type_ok("presenter", "Bugzilla Administrator", "Enter presenter"); @@ -153,7 +153,7 @@ _check_group('infra'); # presentation -#$sel->open_ok("/$config->{bugzilla_installation}/enter_bug.cgi?product=mozilla.org&format=presentation"); +#$sel->open_ok("/enter_bug.cgi?product=mozilla.org&format=presentation"); #$sel->wait_for_page_to_load_ok(WAIT_TIME); #$sel->title_is("Mozilla Corporation Mountain View Presentation Request", "Open custom bug entry form - presentation"); #$sel->type_ok("presenter", "Bugzilla Administrator", "Enter presenter"); @@ -182,7 +182,7 @@ _check_version('mozilla.org', 'other'); _check_component('mozilla.org', 'Discussion Forums'); $sel->open_ok( - "/$config->{bugzilla_installation}/enter_bug.cgi?product=mozilla.org&format=mozlist" + "/enter_bug.cgi?product=mozilla.org&format=mozlist" ); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Mozilla Discussion Forum", @@ -213,7 +213,7 @@ _check_group('mozilla-confidential'); _check_group('pr-private'); -#$sel->open_ok("/$config->{bugzilla_installation}/enter_bug.cgi?product=Mozilla PR&format=mozpr"); +#$sel->open_ok("/enter_bug.cgi?product=Mozilla PR&format=mozpr"); #$sel->wait_for_page_to_load_ok(WAIT_TIME); #$sel->title_is("Create a PR Request", "Open custom bug entry form - mozpr"); #$sel->select_ok("location", "value=China", "Select location"); @@ -234,7 +234,7 @@ _check_component('Legal', 'Contract Request'); _check_group('mozilla-employee-confidential'); $sel->open_ok( - "/$config->{bugzilla_installation}/enter_bug.cgi?product=Legal&format=legal"); + "/enter_bug.cgi?product=Legal&format=legal"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Mozilla Corporation Legal Requests", "Open custom bug entry form - legal"); diff --git a/qa/t/test_bug_edit.t b/qa/t/test_bug_edit.t index bb78dcce7..fcd22cd1e 100644 --- a/qa/t/test_bug_edit.t +++ b/qa/t/test_bug_edit.t @@ -32,11 +32,11 @@ if ($sel->is_text_present("My bugs from QA_Selenium")) { # Just in case the test failed before completion previously, reset the CANEDIT bit. go_to_admin($sel); $sel->click_ok("link=Groups"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/editgroups.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/editgroups.cgi}); $sel->title_is("Edit Groups"); $sel->click_ok("link=Master"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/editgroups.cgi?action=changeform&group=25}); + q{http://HOSTNAME:8000/editgroups.cgi?action=changeform&group=25}); $sel->title_is("Change Group: Master"); my $group_url = $sel->get_location(); $group_url =~ /group=(\d+)$/; @@ -54,7 +54,7 @@ $sel->type_ok("short_desc", "Test bug editing"); $sel->type_ok("comment", "ploc"); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=__BUG_ID__}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=__BUG_ID__}); my $bug1_id = $sel->get_value('//input[@name="id" and @type="hidden"]'); $sel->is_text_present_ok('has been added to the database', "Bug $bug1_id created"); @@ -71,19 +71,19 @@ $sel->type_ok("comment", "new comment from me :)"); $sel->select_ok("bug_status", "label=RESOLVED"); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); # Now move the bug into another product, which has a mandatory group. $sel->click_ok("link=bug $bug1_id"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->title_like(qr/^$bug1_id /); $sel->select_ok("product", "label=QA-Selenium-TEST"); $sel->type_ok("comment", "moving to QA-Selenium-TEST"); $sel->click_ok("commit"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/process_bug.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/process_bug.cgi}); $sel->title_is("Verify New Product Details..."); $sel->select_ok("component", "label=QA-Selenium-TEST"); $sel->is_element_present_ok( @@ -98,11 +98,11 @@ $sel->is_checked_ok( "QA-Selenium-TEST group is selected"); $sel->click_ok("change_product"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); $sel->click_ok("link=bug $bug1_id"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->title_like(qr/^$bug1_id /); $sel->select_ok("bug_severity", "label=normal"); $sel->select_ok("priority", "label=High"); @@ -117,18 +117,18 @@ $sel->click_ok("reporter_accessible"); $sel->select_ok("bug_status", "label=VERIFIED"); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); $sel->click_ok("link=bug $bug1_id"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->title_like(qr/^$bug1_id /); $sel->type_ok("comment", "I am the reporter, but I can see the bug anyway as I belong to the mandatory group" ); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); logout($sel); @@ -146,18 +146,18 @@ $sel->type_ok("assigned_to", $config->{admin_user_login}); $sel->type_ok("comment", "I have editbugs privs. Taking!"); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); $sel->click_ok("link=bug $bug1_id"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->title_like(qr/^$bug1_id /); $sel->click_ok("cc_edit_area_showhide"); $sel->type_ok("newcc", $config->{unprivileged_user_login}); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); logout($sel); @@ -179,7 +179,7 @@ $sel->type_ok("comment", ); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); logout($sel); @@ -189,7 +189,7 @@ log_in($sel, $config, 'unprivileged'); $sel->type_ok("quicksearch_top", $bug1_id); $sel->submit("header-search"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->title_is("Access Denied"); $sel->is_text_present_ok("You are not authorized to access bug $bug1_id"); logout($sel); @@ -206,7 +206,7 @@ $sel->click_ok("set_default_assignee"); $sel->uncheck_ok("set_default_assignee"); $sel->type_ok("comment", "-> Moving back to Testproduct."); $sel->click_ok("commit"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/process_bug.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/process_bug.cgi}); $sel->title_is("Verify New Product Details..."); $sel->select_ok("component", "label=TestComponent"); $sel->is_text_present_ok( @@ -236,11 +236,11 @@ ok( ); $sel->click_ok("change_product"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); $sel->click_ok("link=bug $bug1_id"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->title_like(qr/^$bug1_id /); $sel->click_ok("cclist_accessible"); $sel->type_ok("comment", @@ -248,7 +248,7 @@ $sel->type_ok("comment", ); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); logout($sel); @@ -274,7 +274,7 @@ $sel->add_selection_ok("cc", "label=" . $config->{admin_user_login}); $sel->click_ok("removecc"); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); logout($sel); @@ -284,12 +284,12 @@ log_in($sel, $config, 'admin'); edit_product($sel, "TestProduct"); $sel->click_ok("link=Edit Group Access Controls:"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/editproducts.cgi?action=editgroupcontrols&product=TestProduct} + q{http://HOSTNAME:8000/editproducts.cgi?action=editgroupcontrols&product=TestProduct} ); $sel->title_is("Edit Group Controls for TestProduct"); $sel->check_ok("canedit_$master_gid"); $sel->click_ok("submit"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/editproducts.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/editproducts.cgi}); $sel->title_is("Update group access controls for TestProduct"); # The user is in the master group, so he can comment. @@ -298,7 +298,7 @@ go_to_bug($sel, $bug1_id); $sel->type_ok("comment", "Do nothing except adding a comment..."); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); logout($sel); @@ -308,7 +308,7 @@ log_in($sel, $config, 'QA_Selenium_TEST'); go_to_bug($sel, $bug1_id); $sel->type_ok("comment", "Just a comment too..."); $sel->click_ok("commit"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/process_bug.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/process_bug.cgi}); $sel->title_is("Product Edit Access Denied"); $sel->is_text_present_ok( "You are not permitted to edit bugs in product TestProduct."); @@ -335,7 +335,7 @@ $sel->type_ok("email2", $config->{QA_Selenium_TEST_user_login}); screenshot_page($sel, '/app/artifacts/line271.png'); $sel->click_ok("Search"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/buglist.cgi?emailreporter2=1&emailtype2=exact&order=Importance&list_id=15&emailtype1=exact&emailcc2=1&query_format=advanced&emailassigned_to1=1&emailqa_contact2=1&email2=QA-Selenium-TEST%40mozilla.test&email1=admin%40mozilla.test&emailassigned_to2=1&product=TestProduct} + q{http://HOSTNAME:8000/buglist.cgi?emailreporter2=1&emailtype2=exact&order=Importance&list_id=15&emailtype1=exact&emailcc2=1&query_format=advanced&emailassigned_to1=1&emailqa_contact2=1&email2=QA-Selenium-TEST%40mozilla.test&email1=admin%40mozilla.test&emailassigned_to2=1&product=TestProduct} ); $sel->title_is("Bug List"); screenshot_page($sel, '/app/artifacts/line275.png'); @@ -343,18 +343,18 @@ $sel->is_text_present_ok("One bug found."); $sel->type_ok("save_newqueryname", "My bugs from QA_Selenium"); $sel->click_ok("remember"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/buglist.cgi?newquery=email1%3Dadmin%2540mozilla.test%26email2%3DQA-Selenium-TEST%2540mozilla.test%26emailassigned_to1%3D1%26emailassigned_to2%3D1%26emailcc2%3D1%26emailqa_contact2%3D1%26emailreporter2%3D1%26emailtype1%3Dexact%26emailtype2%3Dexact%26list_id%3D15%26product%3DTestProduct%26query_format%3Dadvanced%26order%3Dpriority%252Cbug_severity&cmdtype=doit&remtype=asnamed&token=1531926552-dc69995d79c786af046436ec6717000b&newqueryname=My%20bugs%20from%20QA_Selenium&list_id=16} + q{http://HOSTNAME:8000/buglist.cgi?newquery=email1%3Dadmin%2540mozilla.test%26email2%3DQA-Selenium-TEST%2540mozilla.test%26emailassigned_to1%3D1%26emailassigned_to2%3D1%26emailcc2%3D1%26emailqa_contact2%3D1%26emailreporter2%3D1%26emailtype1%3Dexact%26emailtype2%3Dexact%26list_id%3D15%26product%3DTestProduct%26query_format%3Dadvanced%26order%3Dpriority%252Cbug_severity&cmdtype=doit&remtype=asnamed&token=1531926552-dc69995d79c786af046436ec6717000b&newqueryname=My%20bugs%20from%20QA_Selenium&list_id=16} ); $sel->title_is("Search created"); $sel->is_text_present_ok( "OK, you have a new search named My bugs from QA_Selenium."); $sel->click_ok("link=My bugs from QA_Selenium"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/buglist.cgi?cmdtype=runnamed&namedcmd=My%20bugs%20from%20QA_Selenium&list_id=17} + q{http://HOSTNAME:8000/buglist.cgi?cmdtype=runnamed&namedcmd=My%20bugs%20from%20QA_Selenium&list_id=17} ); $sel->title_is("Bug List: My bugs from QA_Selenium"); $sel->click_ok("long_format"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/show_bug.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/show_bug.cgi}); $sel->title_is("Full Text Bug Listing"); $sel->is_text_present_ok("Bug $bug1_id"); $sel->is_text_present_ok("Status: CONFIRMED"); @@ -378,7 +378,7 @@ $sel->type_ok("short_desc", "New bug from me"); $sel->type_ok("comment", "I can enter a new bug, but not edit it, right?"); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=__BUG_ID__}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=__BUG_ID__}); my $bug2_id = $sel->get_value('//input[@name="id" and @type="hidden"]'); $sel->is_text_present_ok('has been added to the database', "Bug $bug2_id created"); @@ -387,20 +387,20 @@ $sel->is_text_present_ok('has been added to the database', $sel->go_back_ok(); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/enter_bug.cgi?product=TestProduct&format=__default__} + q{http://HOSTNAME:8000/enter_bug.cgi?product=TestProduct&format=__default__} ); $sel->title_is("Enter Bug: TestProduct"); $sel->click_ok("commit"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/post_bug.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/post_bug.cgi}); $sel->title_is("Suspicious Action"); $sel->is_text_present_ok("you have no valid token for the create_bug action"); $sel->click_ok('//input[@value="Confirm Changes"]'); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/show_bug.cgi?id=14}); + q{http://HOSTNAME:8000/show_bug.cgi?id=14}); $sel->is_text_present_ok('has been added to the database', 'Bug created'); $sel->type_ok("comment", "New comment not allowed"); $sel->click_ok("commit"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/process_bug.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/process_bug.cgi}); $sel->title_is("Product Edit Access Denied"); $sel->is_text_present_ok( "You are not permitted to edit bugs in product TestProduct."); @@ -415,7 +415,7 @@ $sel->type_ok("assigned_to", $config->{admin_user_login}); $sel->type_ok("comment", "Taking!"); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug2_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug2_id}); $sel->is_text_present_ok("Changes submitted for bug $bug2_id"); # Test mass-change. @@ -423,7 +423,7 @@ $sel->is_text_present_ok("Changes submitted for bug $bug2_id"); $sel->click_ok("link=My bugs from QA_Selenium"); screenshot_page($sel, '/app/artifacts/line344.png'); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/buglist.cgi?cmdtype=runnamed&namedcmd=My%20bugs%20from%20QA_Selenium&list_id=19} + q{http://HOSTNAME:8000/buglist.cgi?cmdtype=runnamed&namedcmd=My%20bugs%20from%20QA_Selenium&list_id=19} ); screenshot_page($sel, '/app/artifacts/line346.png'); $sel->title_is("Bug List: My bugs from QA_Selenium"); @@ -432,7 +432,7 @@ $sel->is_text_present_ok("2 bugs found"); screenshot_page($sel, '/app/artifacts/line350.png'); $sel->click_ok("link=Change Several Bugs at Once"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/buglist.cgi?email1=admin%40mozilla.test&email2=QA-Selenium-TEST%40mozilla.test&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=exact&emailtype2=exact&product=TestProduct&query_format=advanced&order=priority%2Cbug_severity&tweak=1&list_id=20} + q{http://HOSTNAME:8000/buglist.cgi?email1=admin%40mozilla.test&email2=QA-Selenium-TEST%40mozilla.test&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=exact&emailtype2=exact&product=TestProduct&query_format=advanced&order=priority%2Cbug_severity&tweak=1&list_id=20} ); $sel->title_is("Bug List"); $sel->click_ok("check_all"); @@ -440,29 +440,29 @@ $sel->type_ok("comment", 'Mass change"'); $sel->select_ok("bug_status", "label=RESOLVED"); $sel->select_ok("resolution", "label=WORKSFORME"); $sel->click_ok("commit"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/process_bug.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/process_bug.cgi}); $sel->title_is("Bugs processed"); $sel->click_ok("link=bug $bug1_id"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->title_like(qr/$bug1_id /); $sel->selected_label_is("resolution", "WORKSFORME"); $sel->select_ok("resolution", "label=INVALID"); $sel->click_ok("commit"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); $sel->click_ok("link=bug $bug1_id"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->title_like(qr/$bug1_id /); $sel->selected_label_is("resolution", "INVALID"); $sel->click_ok("link=History"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_activity.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_activity.cgi?id=$bug1_id}); $sel->title_is("Changes made to bug $bug1_id"); $sel->is_text_present_ok("URL foo.cgi?action=bar"); $sel->is_text_present_ok("Severity critical blocker"); @@ -523,18 +523,18 @@ foreach my $params (["no_token_single_bug", ""], { my ($comment, $token) = @$params; $sel->open_ok( - "/$config->{bugzilla_installation}/process_bug.cgi?id=$bug1_id&comment=$comment$token", + "/process_bug.cgi?id=$bug1_id&comment=$comment$token", undef, "Edit a single bug with " . ($token ? "an invalid" : "no") . " token" ); $sel->title_is("Suspicious Action"); $sel->is_text_present_ok($token ? "an invalid token" : "web browser directly"); $sel->click_ok("confirm"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->is_text_present_ok("Changes submitted for bug $bug1_id"); $sel->click_ok("link=bug $bug1_id"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug1_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug1_id}); $sel->title_like(qr/^$bug1_id /); $sel->is_text_present_ok($comment); } @@ -544,23 +544,23 @@ foreach my $params (["no_token_mass_change", ""], { my ($comment, $token) = @$params; $sel->open_ok( - "/$config->{bugzilla_installation}/process_bug.cgi?id_$bug1_id=1&id_$bug2_id=1&comment=$comment$token", + "/process_bug.cgi?id_$bug1_id=1&id_$bug2_id=1&comment=$comment$token", undef, "Mass change with " . ($token ? "an invalid" : "no") . " token" ); $sel->title_is("Suspicious Action"); $sel->is_text_present_ok("no valid token for the buglist_mass_change action"); $sel->click_ok("confirm"); - check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/process_bug.cgi}); + check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/process_bug.cgi}); $sel->title_is("Bugs processed"); foreach my $bug_id ($bug1_id, $bug2_id) { $sel->click_ok("link=bug $bug_id"); check_page_load($sel, WAIT_TIME, - qq{http://HOSTNAME:8000/bmo/show_bug.cgi?id=$bug_id}); + qq{http://HOSTNAME:8000/show_bug.cgi?id=$bug_id}); $sel->title_like(qr/^$bug_id /); $sel->is_text_present_ok($comment); next if $bug_id == $bug2_id; $sel->go_back_ok(); - check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/process_bug.cgi}); + check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/process_bug.cgi}); $sel->title_is("Bugs processed"); } } @@ -569,32 +569,32 @@ foreach my $params (["no_token_mass_change", ""], $sel->click_ok("link=My bugs from QA_Selenium"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/buglist.cgi?cmdtype=runnamed&namedcmd=My%20bugs%20from%20QA_Selenium&list_id=21} + q{http://HOSTNAME:8000/buglist.cgi?cmdtype=runnamed&namedcmd=My%20bugs%20from%20QA_Selenium&list_id=21} ); $sel->title_is("Bug List: My bugs from QA_Selenium"); $sel->is_text_present_ok("2 bugs found"); $sel->click_ok("link=Change Several Bugs at Once"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/buglist.cgi?email1=admin%40mozilla.test&email2=QA-Selenium-TEST%40mozilla.test&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=exact&emailtype2=exact&product=TestProduct&query_format=advanced&order=priority%2Cbug_severity&tweak=1&list_id=22} + q{http://HOSTNAME:8000/buglist.cgi?email1=admin%40mozilla.test&email2=QA-Selenium-TEST%40mozilla.test&emailassigned_to1=1&emailassigned_to2=1&emailcc2=1&emailqa_contact2=1&emailreporter2=1&emailtype1=exact&emailtype2=exact&product=TestProduct&query_format=advanced&order=priority%2Cbug_severity&tweak=1&list_id=22} ); $sel->title_is("Bug List"); $sel->click_ok("check_all"); $sel->type_ok("comment", "Reassigning to the reporter"); $sel->type_ok("assigned_to", $config->{QA_Selenium_TEST_user_login}); $sel->click_ok("commit"); -check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/process_bug.cgi}); +check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/process_bug.cgi}); $sel->title_is("Bugs processed"); # Now delete the saved search. $sel->click_ok("link=My bugs from QA_Selenium"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/buglist.cgi?cmdtype=runnamed&namedcmd=My%20bugs%20from%20QA_Selenium&list_id=23} + q{http://HOSTNAME:8000/buglist.cgi?cmdtype=runnamed&namedcmd=My%20bugs%20from%20QA_Selenium&list_id=23} ); $sel->title_is("Bug List: My bugs from QA_Selenium"); $sel->click_ok("link=Forget Search 'My bugs from QA_Selenium'"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/buglist.cgi?cmdtype=dorem&remaction=forget&namedcmd=My%20bugs%20from%20QA_Selenium&token=1531926582-f228fa8ebc2f2b3970f2a791e54534ec&list_id=24} + q{http://HOSTNAME:8000/buglist.cgi?cmdtype=dorem&remaction=forget&namedcmd=My%20bugs%20from%20QA_Selenium&token=1531926582-f228fa8ebc2f2b3970f2a791e54534ec&list_id=24} ); $sel->title_is("Search is gone"); $sel->is_text_present_ok("OK, the My bugs from QA_Selenium search is gone"); @@ -609,11 +609,11 @@ sub clear_canedit_on_testproduct { edit_product($sel, "TestProduct"); $sel->click_ok("link=Edit Group Access Controls:"); check_page_load($sel, WAIT_TIME, - q{http://HOSTNAME:8000/bmo/editproducts.cgi?action=editgroupcontrols&product=TestProduct} + q{http://HOSTNAME:8000/editproducts.cgi?action=editgroupcontrols&product=TestProduct} ); $sel->title_is("Edit Group Controls for TestProduct"); $sel->uncheck_ok("canedit_$master_gid"); $sel->click_ok("submit"); - check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/bmo/editproducts.cgi}); + check_page_load($sel, WAIT_TIME, q{http://HOSTNAME:8000/editproducts.cgi}); $sel->title_is("Update group access controls for TestProduct"); } diff --git a/qa/t/test_classifications.t b/qa/t/test_classifications.t index a9ac8f5a7..c2ed89edf 100644 --- a/qa/t/test_classifications.t +++ b/qa/t/test_classifications.t @@ -32,7 +32,7 @@ $sel->title_is("Select classification"); # and 2) automatically reclassify products in this classification. if ($sel->is_text_present("cone")) { $sel->open_ok( - "/$config->{bugzilla_installation}/editclassifications.cgi?action=delete&classification=cone" + "/editclassifications.cgi?action=delete&classification=cone" ); $sel->title_is("Suspicious Action"); $sel->click_ok("confirm"); @@ -41,7 +41,7 @@ if ($sel->is_text_present("cone")) { } if ($sel->is_text_present("ctwo")) { $sel->open_ok( - "/$config->{bugzilla_installation}/editclassifications.cgi?action=delete&classification=ctwo" + "/editclassifications.cgi?action=delete&classification=ctwo" ); $sel->title_is("Suspicious Action"); $sel->click_ok("confirm"); @@ -154,6 +154,6 @@ $sel->title_is("Classification Deleted"); # Disable classifications and make sure you cannot edit them anymore. set_parameters($sel, {"Bug Fields" => {"useclassification-off" => undef}}); -$sel->open_ok("/$config->{bugzilla_installation}/editclassifications.cgi"); +$sel->open_ok("/editclassifications.cgi"); $sel->title_is("Classification Not Enabled"); logout($sel); diff --git a/qa/t/test_config.t b/qa/t/test_config.t index 7ad97190a..6297d1182 100644 --- a/qa/t/test_config.t +++ b/qa/t/test_config.t @@ -23,7 +23,7 @@ logout($sel); # Accessing config.cgi should display no sensitive data. -$sel->open_ok("/$config->{bugzilla_installation}/config.cgi", +$sel->open_ok("/config.cgi", undef, "Go to config.cgi (JS format)"); $sel->is_text_present_ok("var status = [ ];"); $sel->is_text_present_ok("var status_open = [ ];"); diff --git a/qa/t/test_create_user_accounts.t b/qa/t/test_create_user_accounts.t index 25f93ba65..c03551ffd 100644 --- a/qa/t/test_create_user_accounts.t +++ b/qa/t/test_create_user_accounts.t @@ -155,7 +155,7 @@ $sel->refresh; $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Bugzilla Main Page"); ok(!$sel->is_text_present("New Account"), "No link named 'New Account'"); -$sel->open_ok("/$config->{bugzilla_installation}/createaccount.cgi"); +$sel->open_ok("/createaccount.cgi"); $sel->title_is("Account Creation Disabled"); $error_msg = trim($sel->get_text("error_msg")); ok( diff --git a/qa/t/test_keywords.t b/qa/t/test_keywords.t index ffbb59927..82fcd41f3 100644 --- a/qa/t/test_keywords.t +++ b/qa/t/test_keywords.t @@ -158,7 +158,7 @@ $sel->is_text_present_ok("Zarro Boogs found"); # Make sure describekeywords.cgi works as expected. -$sel->open_ok("/$config->{bugzilla_installation}/describekeywords.cgi"); +$sel->open_ok("/describekeywords.cgi"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bugzilla Keyword Descriptions"); $sel->is_text_present_ok("key-selenium-kone"); diff --git a/qa/t/test_login.t b/qa/t/test_login.t index 2d8cc4217..73b2b7155 100644 --- a/qa/t/test_login.t +++ b/qa/t/test_login.t @@ -21,7 +21,7 @@ my ($sel, $config) = get_selenium(); # Try to log in to Bugzilla using an invalid account. To be sure that the login form # is triggered, we try to access an admin page. -$sel->open_ok("/$config->{bugzilla_installation}/editparams.cgi"); +$sel->open_ok("/editparams.cgi"); $sel->title_is("Log in to Bugzilla"); # The login and password are hardcoded here, because this account doesn't exist. diff --git a/qa/t/test_long_list_redirection.t b/qa/t/test_long_list_redirection.t index b2c22e66a..6f4509a21 100644 --- a/qa/t/test_long_list_redirection.t +++ b/qa/t/test_long_list_redirection.t @@ -13,7 +13,7 @@ use QA::Util; my ($sel, $config) = get_selenium(); -$sel->open_ok("/$config->{bugzilla_installation}/long_list.cgi?id=1"); +$sel->open_ok("/long_list.cgi?id=1"); $sel->title_is("Full Text Bug Listing", "Display bug as format for printing"); my $text = $sel->get_text('//*[@id="bugzilla-body"]//h1'); $text =~ s/[\r\n\t\s]+/ /g; diff --git a/qa/t/test_milestones.t b/qa/t/test_milestones.t index a7860879d..c9da02669 100644 --- a/qa/t/test_milestones.t +++ b/qa/t/test_milestones.t @@ -129,7 +129,7 @@ $sel->is_text_present_ok("Changes submitted for bug $bug2_id"); # 7th step: test validation methods for milestones. -$sel->open_ok("/$config->{bugzilla_installation}/editmilestones.cgi"); +$sel->open_ok("/editmilestones.cgi"); $sel->title_is("Edit milestones for which product?"); $sel->click_ok("link=TestProduct"); $sel->wait_for_page_to_load(WAIT_TIME); @@ -181,7 +181,7 @@ $sel->title_is("Milestone Deleted"); # 8th step: make sure the (now deleted) milestone of the bug has fallen back to the default milestone. -$sel->open_ok("/$config->{bugzilla_installation}/show_bug.cgi?id=$bug1_id"); +$sel->open_ok("/show_bug.cgi?id=$bug1_id"); $sel->title_like(qr/^$bug1_id/); $sel->is_text_present_ok('regexp:Target Milestone:\W+---', undef, "Milestone has fallen back to the default milestone"); diff --git a/qa/t/test_qa_contact.t b/qa/t/test_qa_contact.t index 65ff14e3b..9de4fb21f 100644 --- a/qa/t/test_qa_contact.t +++ b/qa/t/test_qa_contact.t @@ -20,7 +20,7 @@ my ($sel, $config) = get_selenium(); log_in($sel, $config, 'admin'); if ($sel->is_text_present("My QA query")) { $sel->open_ok( - "/$config->{bugzilla_installation}/buglist.cgi?cmdtype=dorem&remaction=forget&namedcmd=My%20QA%20query", + "/buglist.cgi?cmdtype=dorem&remaction=forget&namedcmd=My%20QA%20query", undef, "Make sure the 'My QA query' saved search isn't present" ); diff --git a/qa/t/test_require_login.t b/qa/t/test_require_login.t index f8d2629f9..4044ee213 100644 --- a/qa/t/test_require_login.t +++ b/qa/t/test_require_login.t @@ -35,7 +35,7 @@ my @pages = qw(admin attachment buglist chart colchange describecomponents userprefs votes xml); foreach my $page (@pages) { - $sel->open_ok("/$config->{bugzilla_installation}/${page}.cgi"); + $sel->open_ok("/${page}.cgi"); if ($page ne 'votes' || $config->{test_extensions}) { $sel->title_is("Log in to Bugzilla"); } @@ -52,7 +52,7 @@ foreach my $page (@pages) { ); foreach my $page (@pages) { - $sel->open_ok("/$config->{bugzilla_installation}/$page"); + $sel->open_ok("/$page"); if ($page !~ /^votes/ || $config->{test_extensions}) { $sel->title_is("Log in to Bugzilla"); } @@ -69,7 +69,7 @@ foreach my $page (@pages) { ); foreach my $page (@pages) { - $sel->open_ok("/$config->{bugzilla_installation}/$page"); + $sel->open_ok("/$page"); $sel->title_isnt("Log in to Bugzilla"); } diff --git a/qa/t/test_sanity_check.t b/qa/t/test_sanity_check.t index 2a3bbe1de..22d02ab7e 100644 --- a/qa/t/test_sanity_check.t +++ b/qa/t/test_sanity_check.t @@ -29,7 +29,7 @@ my @args remove_invalid_attach_references remove_old_whine_targets rescanallBugMail); foreach my $arg (@args) { - $sel->open_ok("/$config->{bugzilla_installation}/sanitycheck.cgi?$arg=1"); + $sel->open_ok("/sanitycheck.cgi?$arg=1"); $sel->title_is("Suspicious Action", "Calling sanitycheck.cgi with no token triggers a confirmation page"); $sel->click_ok("confirm", "Confirm the action"); diff --git a/qa/t/test_search.t b/qa/t/test_search.t index 2a7993465..9576772ba 100644 --- a/qa/t/test_search.t +++ b/qa/t/test_search.t @@ -30,7 +30,7 @@ $sel->is_text_present_ok("Zarro Boogs found"); # Display all available columns. Look for all bugs assigned to a user who doesn't exist. $sel->open_ok( - "/$config->{bugzilla_installation}/buglist.cgi?quicksearch=%40xx45ft&columnlist=all" + "/buglist.cgi?quicksearch=%40xx45ft&columnlist=all" ); $sel->title_like(qr/^Bug List:/); $sel->is_text_present_ok("Zarro Boogs found"); diff --git a/qa/t/test_security.t b/qa/t/test_security.t index 7e975ecca..9915a21e1 100644 --- a/qa/t/test_security.t +++ b/qa/t/test_security.t @@ -14,7 +14,6 @@ use Test::More "no_plan"; use QA::Util; my ($sel, $config) = get_selenium(CHROME_MODE); -my $urlbase = $config->{bugzilla_installation}; my $admin_user = $config->{admin_user_login}; # Let's create a bug and attachment to play with. @@ -55,7 +54,7 @@ $sel->title_like(qr/^$bug1_id /); # # Alternate host for attachments; no cookie should be accessible. # set_parameters($sel, { "Attachments" => {"attachment_base" => {type => "text", -# value => "$config->{browser_ip_url}/$urlbase/"}} }); +# value => "$config->{browser_ip_url}/"}} }); # go_to_bug($sel, $bug1_id); # $sel->click_ok("link=simple patch, v1"); # $sel->wait_for_page_to_load_ok(WAIT_TIME); @@ -88,7 +87,7 @@ my $editbugs_cookie = $sel->get_value("token"); # Using our own unused token is fine. $sel->open_ok( - "/$urlbase/userprefs.cgi?tab=settings&dosave=1&display_quips=off&token=$editbugs_cookie" + "/userprefs.cgi?tab=settings&dosave=1&display_quips=off&token=$editbugs_cookie" ); $sel->title_is("User Preferences"); $sel->is_text_present_ok( @@ -101,7 +100,7 @@ my @args = ("", "token=", "token=i123x", "token=$admin_cookie", foreach my $arg (@args) { $sel->open_ok( - "/$urlbase/userprefs.cgi?tab=settings&dosave=1&display_quips=off&$arg"); + "/userprefs.cgi?tab=settings&dosave=1&display_quips=off&$arg"); $sel->title_is("Suspicious Action"); if ($arg eq "token=$admin_cookie") { diff --git a/qa/t/test_status_whiteboard.t b/qa/t/test_status_whiteboard.t index 2942c9857..c7f1418b3 100644 --- a/qa/t/test_status_whiteboard.t +++ b/qa/t/test_status_whiteboard.t @@ -25,14 +25,14 @@ set_parameters($sel, {'Bug Fields' => {'usestatuswhiteboard-on' => undef}}); # Make sure the status whiteboard is displayed and add stuff to it. -$sel->open_ok("/$config->{bugzilla_installation}/show_bug.cgi?id=$test_bug_1"); +$sel->open_ok("/show_bug.cgi?id=$test_bug_1"); $sel->title_like(qr/^$test_bug_1\b/); $sel->is_text_present_ok("Whiteboard:"); $sel->type_ok("status_whiteboard", "[msg from test_status_whiteboard.t: x77v]"); $sel->click_ok("commit"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->is_text_present_ok("Changes submitted for bug $test_bug_1"); -$sel->open_ok("/$config->{bugzilla_installation}/show_bug.cgi?id=$test_bug_2"); +$sel->open_ok("/show_bug.cgi?id=$test_bug_2"); $sel->title_like(qr/^$test_bug_2\b/); $sel->type_ok("status_whiteboard", "[msg from test_status_whiteboard.t: x77v]"); $sel->click_ok("commit"); @@ -79,7 +79,7 @@ $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Search for bugs"); ok(!$sel->is_text_present("Whiteboard:"), "Whiteboard label no longer displayed"); -$sel->open_ok("/$config->{bugzilla_installation}/show_bug.cgi?id=$test_bug_1"); +$sel->open_ok("/show_bug.cgi?id=$test_bug_1"); $sel->title_like(qr/^$test_bug_1\b/); ok(!$sel->is_element_present('//label[@for="status_whiteboard"]')); diff --git a/qa/t/test_sudo_sessions.t b/qa/t/test_sudo_sessions.t index 1e29da42f..a8cdbb20e 100644 --- a/qa/t/test_sudo_sessions.t +++ b/qa/t/test_sudo_sessions.t @@ -101,7 +101,7 @@ $sel->title_is("User Preferences"); $sel->is_text_present_ok("There are no permission bits set on your account"); # We access the page directly as there is no link pointing to it. -$sel->open_ok("/$config->{bugzilla_installation}/editusers.cgi"); +$sel->open_ok("/editusers.cgi"); $sel->title_is("Authorization Required"); $error_msg = trim($sel->get_text("error_msg")); ok($error_msg =~ /^Sorry, you aren't a member of the 'editusers' group/, @@ -115,7 +115,7 @@ $sel->is_text_present_ok("The sudo session has been ended"); # Try to access the sudo page directly, with no credentials. $sel->open_ok( - "/$config->{bugzilla_installation}/relogin.cgi?action=begin-sudo&target_login=$config->{admin_user_login}" + "/relogin.cgi?action=begin-sudo&target_login=$config->{admin_user_login}" ); $sel->title_is("Password Required"); @@ -155,7 +155,7 @@ $sel->title_is("Password Required"); # Same as above, but with your password. $sel->open_ok( - "/$config->{bugzilla_installation}/relogin.cgi?action=prepare-sudo&target_login=foo\@bar.com" + "/relogin.cgi?action=prepare-sudo&target_login=foo\@bar.com" ); $sel->title_is("Begin sudo session"); $sel->value_is("target_login", 'foo@bar.com'); diff --git a/qa/t/test_time_summary.t b/qa/t/test_time_summary.t index 646f6ea66..7f977303b 100644 --- a/qa/t/test_time_summary.t +++ b/qa/t/test_time_summary.t @@ -47,7 +47,7 @@ $sel->is_text_present_ok("Hours Worked: 2.6"); # Let's call summarize_time.cgi directly, with no parameters. -$sel->open_ok("/$config->{bugzilla_installation}/summarize_time.cgi"); +$sel->open_ok("/summarize_time.cgi"); $sel->title_is("No Bugs Selected"); my $error_msg = trim($sel->get_text("error_msg")); ok($error_msg =~ /You apparently didn't choose any bugs to view/, diff --git a/qa/t/test_user_preferences.t b/qa/t/test_user_preferences.t index de311533f..8a3473185 100644 --- a/qa/t/test_user_preferences.t +++ b/qa/t/test_user_preferences.t @@ -137,7 +137,7 @@ $sel->is_text_present_ok("The next bug I should see is this one."); # Remove the tag from all bugs. -$sel->open_ok("/$config->{bugzilla_installation}/buglist.cgi?tag=sel-tmp", +$sel->open_ok("/buglist.cgi?tag=sel-tmp", undef, "List 'sel-tmp' bugs"); $sel->wait_for_page_to_load(WAIT_TIME); $sel->title_is("Bug List"); diff --git a/qa/t/test_user_privs.t b/qa/t/test_user_privs.t index 4c9acbfef..3f9ee4358 100644 --- a/qa/t/test_user_privs.t +++ b/qa/t/test_user_privs.t @@ -18,7 +18,7 @@ my $test_bug_1 = $config->{test_bug_1}; # When being logged out, the 'Commit' button should not be displayed. -$sel->open_ok("/$config->{bugzilla_installation}/index.cgi?logout=1", +$sel->open_ok("/index.cgi?logout=1", undef, "Log out (if required)"); $sel->wait_for_page_to_load_ok(WAIT_TIME); $sel->title_is("Logged Out"); diff --git a/qa/t/webservice_bug_get.t b/qa/t/webservice_bug_get.t index c87346c08..59b5cfd9d 100644 --- a/qa/t/webservice_bug_get.t +++ b/qa/t/webservice_bug_get.t @@ -26,7 +26,7 @@ my $private_id = $private_bug->{id}; my $public_id = $public_bug->{id}; my $base_url - = $config->{browser_url} . "/" . $config->{bugzilla_installation} . '/'; + = $config->{browser_url} . '/'; # Set a few fields on the private bug, including setting up # a dependency relationship. diff --git a/qa/t/webservice_bug_get_bugs.t b/qa/t/webservice_bug_get_bugs.t index 9fbe00fbd..f0b2beaad 100644 --- a/qa/t/webservice_bug_get_bugs.t +++ b/qa/t/webservice_bug_get_bugs.t @@ -26,7 +26,7 @@ my $private_id = $private_bug->{id}; my $public_id = $public_bug->{id}; my $base_url - = $config->{browser_url} . "/" . $config->{bugzilla_installation} . '/'; + = $config->{browser_url} . '/'; # Set a few fields on the private bug, including setting up # a dependency relationship. diff --git a/qa/t/webservice_bug_update.t b/qa/t/webservice_bug_update.t index 2d82170cb..4012dccc6 100644 --- a/qa/t/webservice_bug_update.t +++ b/qa/t/webservice_bug_update.t @@ -70,8 +70,7 @@ sub valid_values { my $second_id = $second_bug->{id}; my $comment_id = $public_bug->{comment}->{id}; my $bug_uri - = $config->{browser_url} . '/' - . $config->{bugzilla_installation} + = $config->{browser_url} . '/show_bug.cgi?id='; my %values = ( diff --git a/scripts/entrypoint.pl b/scripts/entrypoint.pl index ca719e1a8..d69ca94cc 100755 --- a/scripts/entrypoint.pl +++ b/scripts/entrypoint.pl @@ -60,8 +60,7 @@ check_env( ); if ($ENV{BMO_urlbase} eq 'AUTOMATIC') { - $ENV{BMO_urlbase} = sprintf 'http://%s:%d/%s', hostname(), $ENV{PORT}, - $ENV{BZ_QA_LEGACY_MODE} ? 'bmo/' : ''; + $ENV{BMO_urlbase} = sprintf 'http://%s:%d/', hostname(), $ENV{PORT}; $ENV{BZ_BASE_URL} = sprintf 'http://%s:%d', hostname(), $ENV{PORT}; }