Bugzilla – Attachment 105589 Details for
Bug 25623
Some tests in oauth.t do not roll back
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25623: Make sure oauth.t rolls back the db
Bug-25623-Make-sure-oautht-rolls-back-the-db.patch (text/plain), 1.69 KB, created by
Julian Maurice
on 2020-06-05 13:32:50 UTC
(
hide
)
Description:
Bug 25623: Make sure oauth.t rolls back the db
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2020-06-05 13:32:50 UTC
Size:
1.69 KB
patch
obsolete
>From 6d33c2175d6fd472c2edff6f73b41300ca1eeb24 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 29 May 2020 14:41:25 -0300 >Subject: [PATCH] Bug 25623: Make sure oauth.t rolls back the db > >This patch adds a missing transaction wrapping one of the subtests. This >is probably an oversight when refactoring this file. > >To test: >1. Open the patron categories page >2. Run: > $ kshell > k$ prove t/db_dependent/api/v1/oauth.t >=> SUCCESS: Tests pass >3. Reload the patron categories page >=> FAIL: There's random data in there >4. Apply this patch and repeat 2 >5. Reload the patron categories page >=> SUCCESS: The random data from the previous tests is still there, but >no new random data >=> SUCCESS: Tests still pass >6. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > t/db_dependent/api/v1/oauth.t | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/t/db_dependent/api/v1/oauth.t b/t/db_dependent/api/v1/oauth.t >index 2cf34fd12a..4e464d53f2 100755 >--- a/t/db_dependent/api/v1/oauth.t >+++ b/t/db_dependent/api/v1/oauth.t >@@ -84,6 +84,8 @@ subtest 'Net::OAuth2::AuthorizationServer missing tests' => sub { > > plan tests => 10; > >+ $schema->storage->txn_begin; >+ > my $load_conditional = Test::MockModule->new('Module::Load::Conditional'); > > # Enable the client credentials grant syspref >@@ -115,6 +117,7 @@ subtest 'Net::OAuth2::AuthorizationServer missing tests' => sub { > ->status_is(400) > ->json_is( { error => 'Unimplemented grant type' } ); > >+ $schema->storage->txn_rollback; > }; > > sub run_oauth_tests { >-- >2.20.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 25623
:
105438
|
105457
| 105589