Bug 17538 - t/db_dependent/Upload.t is broken
Summary: t/db_dependent/Upload.t is broken
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 17216
Blocks:
  Show dependency treegraph
 
Reported: 2016-11-02 11:01 UTC by Jonathan Druart
Modified: 2017-06-14 22:15 UTC (History)
2 users (show)

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


Attachments
Bug 17538: (Bug 17216 follow-up) Fix t/db_dependent/Upload.t (1.35 KB, patch)
2016-11-02 11:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17538: (Bug 17216 follow-up) Fix t/db_dependent/Upload.t (1.45 KB, patch)
2016-11-02 13:33 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 17538: (Bug 17216 follow-up) Fix t/db_dependent/Upload.t (1.46 KB, patch)
2016-11-03 14:39 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2016-11-02 11:01:47 UTC
% prove t/db_dependent/Upload.t
t/db_dependent/Upload.t .. 1/8 DBD::mysql::db do failed: Cannot add or update a child row: a foreign key constraint fails (`koha_kohadev`.`authorised_values`, CONSTRAINT `authorised_values_authorised_values_category` FOREIGN KEY (`category`) REFERENCES `authorised_value_categories` (`category_name`) ON DELETE CASC) [for Statement "INSERT INTO authorised_values (category, authorised_value, lib) VALUES (?,?,?) "] at t/db_dependent/Upload.t line 164.

    #   Failed test 'getCategories returned at least one category'
    #   at t/db_dependent/Upload.t line 166.
    #          got: ''
    #     expected: '1'
    # Looks like you failed 1 test of 2.

#   Failed test 'Test07'
#   at t/db_dependent/Upload.t line 76.
# Looks like you failed 1 test of 8.
t/db_dependent/Upload.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/8 subtests 

Test Summary Report
-------------------
t/db_dependent/Upload.t (Wstat: 256 Tests: 8 Failed: 1)
  Failed test:  7
  Non-zero exit status: 1
Files=1, Tests=8,  1 wallclock secs ( 0.02 usr  0.00 sys +  0.88 cusr  0.65 csys =  1.55 CPU)
Result: FAIL
Comment 1 Jonathan Druart 2016-11-02 11:03:07 UTC
Created attachment 57077 [details] [review]
Bug 17538: (Bug 17216 follow-up) Fix t/db_dependent/Upload.t

The insert into authorised_values failed because of the missing FK

Test plan:
  prove t/db_dependent/Upload.t
should return green
Comment 2 Marcel de Rooy 2016-11-02 13:33:44 UTC
Created attachment 57097 [details] [review]
Bug 17538: (Bug 17216 follow-up) Fix t/db_dependent/Upload.t

The insert into authorised_values failed because of the missing FK

Test plan:
  prove t/db_dependent/Upload.t
should return green

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 3 Tomás Cohen Arazi 2016-11-03 14:39:42 UTC
Created attachment 57133 [details] [review]
Bug 17538: (Bug 17216 follow-up) Fix t/db_dependent/Upload.t

The insert into authorised_values failed because of the missing FK

Test plan:
  prove t/db_dependent/Upload.t
should return green

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Kyle M Hall 2016-11-04 11:05:40 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 5 Mason James 2016-11-30 08:23:58 UTC
blocked by DB changes, passing for 16.05