Bugzilla – Attachment 127637 Details for
Bug 29484
ListSets doesn't return noSetHierarchy when appropriate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29484: Regression tests
Bug-29484-Regression-tests.patch (text/plain), 1.91 KB, created by
Tomás Cohen Arazi
on 2021-11-15 12:55:20 UTC
(
hide
)
Description:
Bug 29484: Regression tests
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2021-11-15 12:55:20 UTC
Size:
1.91 KB
patch
obsolete
>From a9c5990208dd69adc60448badaee44346223f713 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 15 Nov 2021 09:51:53 -0300 >Subject: [PATCH] Bug 29484: Regression tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/OAI/Server.t | 42 ++++++++++++++++++++++++++++++++++++- > 1 file changed, 41 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index d5ddf5ed75..dec8ef01f7 100755 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -21,7 +21,7 @@ use Modern::Perl; > use Test::Deep qw( cmp_deeply re ); > use Test::MockTime qw/set_fixed_time set_relative_time restore_time/; > >-use Test::More tests => 33; >+use Test::More tests => 34; > use DateTime; > use File::Basename; > use File::Spec; >@@ -863,3 +863,43 @@ subtest 'Tests for timestamp handling' => sub { > > $schema->storage->txn_rollback; > }; >+ >+subtest 'ListSets() tests' => sub { >+ >+ plan tests => 2; >+ >+ $schema->storage->txn_begin; >+ >+ # initial cleanup >+ $schema->resultset('OaiSet')->delete; >+ >+ test_query( >+ 'ListSets - no sets should return a noSetHierarchy exception', >+ { verb => 'ListSets' }, >+ { >+ error => { >+ code => 'noSetHierarchy', >+ content => 'There are no OAI sets defined', >+ } >+ } >+ ); >+ >+ # Add a couple sets >+ AddOAISet({ spec => 'set_1', name => 'Set 1' }); >+ AddOAISet({ spec => 'set_2', name => 'Set 2' }); >+ >+ test_query( >+ 'ListSets - no sets should return a noSetHierarchy exception', >+ { verb => 'ListSets' }, >+ { >+ ListSets => { >+ set => [ >+ { setSpec => 'set_1', setName => 'Set 1' }, >+ { setSpec => 'set_2', setName => 'Set 2' }, >+ ] >+ } >+ } >+ ); >+ >+ $schema->storage->txn_rollback; >+}; >-- >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 29484
:
127637
|
127638
|
127995
|
127996
|
128169
|
128170