| Summary: | REST tests cleanup ineffective | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Lari Taskula <lari.taskula> |
| Component: | Test Suite | Assignee: | 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 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
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. (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. |
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.