Bugzilla – Attachment 127587 Details for
Bug 21105
oai.pl returns invalid earliestDatestamp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21105: Regression tests
Bug-21105-Regression-tests.patch (text/plain), 2.04 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-11-12 14:37:41 UTC
(
hide
)
Description:
Bug 21105: Regression tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-11-12 14:37:41 UTC
Size:
2.04 KB
patch
obsolete
>From ebd418118abcb86d2187d7dd516e493229e3e670 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 12 Nov 2021 10:16:37 -0300 >Subject: [PATCH] Bug 21105: Regression tests > >This patch introduces a regression test for the fixed behavior. >I also changed a oneliner regex we had for stripping query parameters >because it was causing a warning with the tests base URL >(http://localhost) because it was generating an empty baseURL. > >To test: >1. Apply the regression tests patch >2. Run: > $ kshell > k$ prove t/db_dependent/OAI/Server.t >=> FAIL: Tests fail, the response is incorrect! >3. Apply the bug's patch >4. Repeat 2 >=> SUCCESS: Tests pass! Good response! >--- > t/db_dependent/OAI/Server.t | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index 22fb77ed57..030c5093e2 100755 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -514,7 +514,7 @@ subtest 'ListSets tests' => sub { > > subtest 'Tests for timestamp handling' => sub { > >- plan tests => 27; >+ plan tests => 28; > > t::lib::Mocks::mock_preference( 'OAI::PMH' => 1 ); > t::lib::Mocks::mock_preference( 'OAI-PMH:MaxCount' => 3 ); >@@ -614,6 +614,21 @@ subtest 'Tests for timestamp handling' => sub { > $get_no_items, > { GetRecord => $expected_no_items } > ); >+ test_query( >+ 'Identify - earliestDatestamp in the right format', >+ { verb => 'Identify' }, >+ { Identify => { >+ adminEmail => 'root@localhost', >+ baseURL => 'http://localhost', >+ compression => 'gzip', >+ deletedRecord => 'persistent', >+ earliestDatestamp => '2014-05-07T13:36:23Z', >+ granularity => 'YYYY-MM-DDThh:mm:ssZ', >+ protocolVersion => '2.0', >+ repositoryName => 'My Library', >+ } >+ } >+ ); > > # Add an item 10 seconds later and check results > set_relative_time(10); >-- >2.32.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21105
:
119604
|
119692
|
126236
|
126240
|
126241
|
127586
| 127587 |
127588
|
127589
|
127628
|
127644
|
127650
|
127653