Bug 16977

Summary: REST tests cleanup ineffective
Product: Koha Reporter: Lari Taskula <lari.taskula>
Component: Test SuiteAssignee: Chris Cormack <chris>
Status: RESOLVED DUPLICATE QA Contact: Galen Charlton <gmcharlt>
Severity: normal    
Priority: P5 - low CC: jonathan.druart
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Lari Taskula 2016-07-26 10:01:05 UTC
I'm having issues with REST tests. It seems that whenever the test uses authentication, e.g.

my $tx = $t->ua->build_tx(GET => '/api/v1/patrons');
$tx->req->cookies({name => 'CGISESSID', value => $session->id});
$t->request_ok($tx) ...

the test does not cleanup database correctly. This can be currently seen in t/db_dependent/api/v1/patrons.t. For holds.t (the other REST test in master at the time of reporting this bug) there is at the moment no authentication and it seems to cleanup nicely.
Comment 1 Lari Taskula 2016-07-26 10:04:00 UTC
Duplicate issue:
1. Run t/db_dependent/api/v1/patrons.t
2. Have a look at borrowers table. The test data did not cleanup.

Compare to holds.t:
3. Run t/db_dependent/api/v1/holds.t
4. Have a look at borrowers table. The test borrowers from holds.t are cleaned.
Comment 2 Jonathan Druart 2016-11-17 10:37:45 UTC
(In reply to Lari Taskula from comment #1)
> 4. Have a look at borrowers table. The test borrowers from holds.t are
> cleaned.

Note that this is no longer valid, holds.t does not rollback correctly either.
Comment 3 Jonathan Druart 2017-08-30 14:25:34 UTC

*** This bug has been marked as a duplicate of bug 18826 ***