Bugzilla – Attachment 127054 Details for
Bug 28948
Add a /public counterpart for the libraries REST endpoints
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28948: Fix random failure
Bug-28948-Fix-random-failure.patch (text/plain), 1.73 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-10-28 12:33:51 UTC
(
hide
)
Description:
Bug 28948: Fix random failure
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-10-28 12:33:51 UTC
Size:
1.73 KB
patch
obsolete
>From c38f4659511f6c4e137ee9196288188ec6341c0d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 28 Oct 2021 09:30:41 -0300 >Subject: [PATCH] Bug 28948: Fix random failure > >This patch makes the query for randomly generated libraries >deterministic, thus getting rid of the random tests failures. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > t/db_dependent/Koha/REST/Plugin/Objects.t | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha/REST/Plugin/Objects.t b/t/db_dependent/Koha/REST/Plugin/Objects.t >index 47a953a834..9bff09d9c4 100755 >--- a/t/db_dependent/Koha/REST/Plugin/Objects.t >+++ b/t/db_dependent/Koha/REST/Plugin/Objects.t >@@ -89,7 +89,10 @@ get '/libraries/:library_id_1/:library_id_2' => sub { > my $library_id_1 = $c->param('library_id_1'); > my $library_id_2 = $c->param('library_id_2'); > >- my $libraries_rs = Koha::Libraries->search({ branchcode => [ $library_id_1, $library_id_2 ] }); >+ my $libraries_rs = Koha::Libraries->search( >+ { branchcode => [ $library_id_1, $library_id_2 ] }, >+ { order_by => 'branchname' } >+ ); > my $libraries = $c->objects->search( $libraries_rs ); > > $c->render( >@@ -538,8 +541,8 @@ subtest 'objects.search helper, public requests' => sub { > > $schema->storage->txn_begin; > >- my $library_1 = $builder->build_object({ class => 'Koha::Libraries' }); >- my $library_2 = $builder->build_object({ class => 'Koha::Libraries' }); >+ my $library_1 = $builder->build_object({ class => 'Koha::Libraries', value => { branchname => 'A' } }); >+ my $library_2 = $builder->build_object({ class => 'Koha::Libraries', value => { branchname => 'B' } }); > > my $t = Test::Mojo->new; > >-- >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 28948
:
124479
|
124480
|
124481
|
124482
|
124483
|
124749
|
124911
|
124914
|
125901
|
125902
|
125903
|
125904
|
125905
|
125906
|
125907
|
125908
|
125911
|
125912
|
126111
|
126112
|
126113
|
126114
|
126115
|
126116
|
126117
|
126118
|
126119
|
126120
|
126121
|
126122
|
126123
|
126124
|
126125
|
126126
| 127054 |
127055