Bugzilla – Attachment 133656 Details for
Bug 30596
api/v1/acquisitions_baskets.t is failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30596: Prevent api/v1/acquisitions_baskets.t to fail randomly
Bug-30596-Prevent-apiv1acquisitionsbasketst-to-fai.patch (text/plain), 1.48 KB, created by
Jonathan Druart
on 2022-04-22 09:56:48 UTC
(
hide
)
Description:
Bug 30596: Prevent api/v1/acquisitions_baskets.t to fail randomly
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-04-22 09:56:48 UTC
Size:
1.48 KB
patch
obsolete
>From 6be500542cf3f1b3add2655115467d3791a72903 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 22 Apr 2022 11:56:26 +0200 >Subject: [PATCH] Bug 30596: Prevent api/v1/acquisitions_baskets.t to fail > randomly > >--- > t/db_dependent/api/v1/acquisitions_baskets.t | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/acquisitions_baskets.t b/t/db_dependent/api/v1/acquisitions_baskets.t >index e3fb49765c1..bb13bece8b4 100755 >--- a/t/db_dependent/api/v1/acquisitions_baskets.t >+++ b/t/db_dependent/api/v1/acquisitions_baskets.t >@@ -56,8 +56,16 @@ subtest 'list_managers() tests' => sub { > } > ); > >- $t->get_ok("//$userid:$password@/api/v1/acquisitions/baskets/managers?q=$api_filter") >- ->status_is(200)->json_is( [ $patron_with_permission->to_api, $superlibrarian->to_api ] ); >+ my $result = $t->get_ok("//$userid:$password@/api/v1/acquisitions/baskets/managers?q=$api_filter") >+ ->status_is(200); >+ # Don't compare with updated_on >+ my $got = >+ [ map { delete $_->{updated_on}; $_ } @{ $result->tx->res->json } ]; >+ my $patron_with_permission_api = $patron_with_permission->to_api; >+ my $superlibrarian_api = $superlibrarian->to_api; >+ delete $patron_with_permission_api->{updated_on}; >+ delete $superlibrarian_api->{updated_on}; >+ is_deeply( $got, [ $patron_with_permission_api, $superlibrarian_api ] ); > > $schema->storage->txn_rollback; > }; >-- >2.25.1
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 30596
:
133656
|
133668
|
133669
|
133693
|
133845