Bug 16977 - REST tests cleanup ineffective
Summary: REST tests cleanup ineffective
Status: RESOLVED DUPLICATE of bug 18826
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Chris Cormack
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-26 10:01 UTC by Lari Taskula
Modified: 2017-08-30 14:25 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***