Bug 25623 - Some tests in oauth.t do not roll back
Summary: Some tests in oauth.t do not roll back
Status: Pushed to oldoldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on: 20624
Blocks:
  Show dependency treegraph
 
Reported: 2020-05-29 17:38 UTC by Tomás Cohen Arazi
Modified: 2020-07-02 23:33 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.01, 19.11.07, 19.05.13


Attachments
Bug 25623: Make sure oauth.t rolls back the db (1.57 KB, patch)
2020-05-29 17:46 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 25623: Make sure oauth.t rolls back the db (1.64 KB, patch)
2020-06-01 08:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25623: Make sure oauth.t rolls back the db (1.69 KB, patch)
2020-06-05 13:32 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2020-05-29 17:38:54 UTC

    
Comment 1 Tomás Cohen Arazi 2020-05-29 17:40:14 UTC
To reproduce:
1. Open the patron categories list
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/oauth.t
3. Reload the patron categories list
=> FAIL: There's random data in there
Comment 2 Tomás Cohen Arazi 2020-05-29 17:46:28 UTC
Created attachment 105438 [details] [review]
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>
Comment 3 Jonathan Druart 2020-06-01 08:35:00 UTC
Created attachment 105457 [details] [review]
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>
Comment 4 Julian Maurice 2020-06-05 13:32:50 UTC
Created attachment 105589 [details] [review]
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>
Comment 5 Jonathan Druart 2020-06-15 10:00:45 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 6 Lucas Gass 2020-06-17 22:58:03 UTC
backported to 20.05.x for 20.05.01
Comment 7 Aleisha Amohia 2020-06-22 03:48:43 UTC
backported to 19.11.x for 19.11.07
Comment 8 Victor Grousset/tuxayo 2020-07-02 23:33:51 UTC
Backported to 19.05.x branch for 19.05.13