Bug 22618 - Tests in t/Acquisition.t are actually context dependent
Summary: Tests in t/Acquisition.t are actually context dependent
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Target Milestone: ---
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 18736
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-01 17:03 UTC by Kyle M Hall
Modified: 2019-04-16 20:21 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.05


Attachments
Bug 22618: Move tests to t/db_dependent/Acquisition.t (6.31 KB, patch)
2019-04-02 18:02 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 22618: Move tests to t/db_dependent/Acquisition.t (6.35 KB, patch)
2019-04-02 22:00 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 22618: Move tests to t/db_dependent/Acquisition.t (6.40 KB, patch)
2019-04-05 18:42 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 Kyle M Hall 2019-04-01 17:03:13 UTC
Here are the results of running t/Acquisition.t without a database set up:

t/Acquisition.t .. unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
Use of uninitialized value in concatenation (.) or string at C4/Templates.pm line 154.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
Use of uninitialized value in concatenation (.) or string at C4/Auth_with_cas.pm line 42.
unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
t/Acquisition.t .. 1/3 unable to locate Koha configuration file koha-conf.xml at C4/Context.pm line 244.
Can't call method "config" on unblessed reference at Koha/Database.pm line 56.
    # Child (Test for get_rounded_price) exited without calling finalize()

#   Failed test 'Test for get_rounded_price'
#   at /usr/local/share/perl/5.20.2/Test/Builder.pm line 279.
# Looks like you failed 1 test of 3.
# Looks like your test exited with 2 just after 3.
t/Acquisition.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/3 subtests

Test Summary Report
-------------------
t/Acquisition.t (Wstat: 512 Tests: 3 Failed: 1)
  Failed test:  3
  Non-zero exit status: 2
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.02 sys +  2.11 cusr  0.13 csys =  2.29 CPU)
Result: FAIL

These tests should be moved to a file in t/db_dependent
Comment 1 Nick Clemens 2019-04-02 18:02:52 UTC
Created attachment 87328 [details] [review]
Bug 22618: Move tests to t/db_dependent/Acquisition.t

prove -v t/db_dependent/Acquisition.t
Comment 2 Michal Denar 2019-04-02 22:00:13 UTC
Created attachment 87336 [details] [review]
Bug 22618: Move tests to t/db_dependent/Acquisition.t

prove -v t/db_dependent/Acquisition.t

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 3 Tomás Cohen Arazi 2019-04-05 18:42:27 UTC
Created attachment 87464 [details] [review]
Bug 22618: Move tests to t/db_dependent/Acquisition.t

prove -v t/db_dependent/Acquisition.t

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Nick Clemens 2019-04-10 20:14:57 UTC
Awesome work all!

Pushed to master for 19.05
Comment 5 Martin Renvoize 2019-04-15 11:05:32 UTC
Pushed to 18.11.x for 18.11.05
Comment 6 Lucas Gass 2019-04-16 20:21:44 UTC
missing dependency for 18.05.x, not backporting