Bug 21105: (QA follow-up) Silence warning because of tests setup
The tests are using 'http://localhost' and the regex is setting $baseURL to empty in this case. It works on the oai.pl front-end. This patch changes the regex. To test: 1. Run: $ kshell k$ t/db_dependent/OAI/Server.t => FAIL: Boo! Warning! 2. Apply this patch 3. Repeat 2 => SUCCESS: Oh, cool. No warning :-D 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
24c2fee5b4
commit
5cce101444
1 changed files with 4 additions and 1 deletions
|
@ -28,7 +28,10 @@ use base ("HTTP::OAI::Identify");
|
|||
sub new {
|
||||
my ($class, $repository) = @_;
|
||||
|
||||
my ($baseURL) = $repository->self_url() =~ /(.*)\?.*/;
|
||||
my $baseURL = $repository->self_url();
|
||||
$baseURL = $+{base_url}
|
||||
if $baseURL =~ m/(?<base_url>.*)\?.*/;
|
||||
|
||||
my $self = $class->SUPER::new(
|
||||
baseURL => $baseURL,
|
||||
repositoryName => C4::Context->preference("LibraryName"),
|
||||
|
|
Loading…
Reference in a new issue