Bug 18942 - CanUserUseBudget.t and CanUserModifyBudget.t missing system user test cases
Summary: CanUserUseBudget.t and CanUserModifyBudget.t missing system user test cases
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Mark Tompsett
QA Contact: Testopia
URL:
Keywords:
Depends on: 17829
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-14 14:10 UTC by Lee Jamison
Modified: 2018-06-04 20:10 UTC (History)
4 users (show)

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


Attachments
Bug 18942: Add test case to prove change (1.43 KB, patch)
2017-07-14 14:50 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 18942: Internal Server Error symptomatic of using system user (1.74 KB, patch)
2017-07-14 14:50 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 18942: Add test case to prove change (1.47 KB, patch)
2017-07-14 15:15 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18942: Internal Server Error symptomatic of using system user (1.78 KB, patch)
2017-07-14 15:15 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 18942: Simplify syntax (1.23 KB, patch)
2017-07-17 16:48 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18942: Add test case to prove change (1.52 KB, patch)
2017-07-17 17:49 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18942: Internal Server Error symptomatic of using system user (1.84 KB, patch)
2017-07-17 17:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18942: Simplify syntax (1.28 KB, patch)
2017-07-17 17:50 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 18942: (QA followup) Add new tests descriptions (1.40 KB, patch)
2017-07-17 17:50 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 Lee Jamison 2017-07-14 14:10:07 UTC
Under certain circumstances, the Acquisitions module fails to load at CanUserUseBudget in C4::Budgets.

To replicate (assuming using kohadevbox):
1. Login as koha_kohadev
2. Attempt to load the Acquisitions module
3. Notice Internal Server Error
4. Check plack log which shows Can't call method "unblessed" on an undefined value at /home/vagrant/kohaclone/C4/Budgets.pm line 919.
Comment 1 Mark Tompsett 2017-07-14 14:38:31 UTC
Given there is an easy way to trigger this problem. I changed the title.
Comment 2 Mark Tompsett 2017-07-14 14:38:59 UTC
-- and expanded scope a little: same file, same tweak.
Comment 3 Mark Tompsett 2017-07-14 14:50:04 UTC
Created attachment 65051 [details] [review]
Bug 18942: Add test case to prove change
Comment 4 Mark Tompsett 2017-07-14 14:50:07 UTC
Created attachment 65052 [details] [review]
Bug 18942: Internal Server Error symptomatic of using system user

TEST PLAN
---------
1) sudo koha-shell -c bash kohadev
2) prove -v t/Budgets/CanUserUseBudget.t
   -- works
3) prove -v t/Budgets/CanUserModifyBudget.t
   -- works
4) exit
5) git bz apply 18942
   -- interactive just the test patch
6) repeat steps 1-4
   -- prove fails (similar message with 919 in comment #0)
7) git bz apply 18942
   -- interactive just the actual fix
8) repeat steps 1-4
   -- works
9) run koha qa test tools
Comment 5 Lee Jamison 2017-07-14 15:15:07 UTC
Created attachment 65055 [details] [review]
Bug 18942: Add test case to prove change

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Works as directed following test plan!
Comment 6 Lee Jamison 2017-07-14 15:15:16 UTC
Created attachment 65056 [details] [review]
Bug 18942: Internal Server Error symptomatic of using system user

TEST PLAN
---------
1) sudo koha-shell -c bash kohadev
2) prove -v t/Budgets/CanUserUseBudget.t
   -- works
3) prove -v t/Budgets/CanUserModifyBudget.t
   -- works
4) exit
5) git bz apply 18942
   -- interactive just the test patch
6) repeat steps 1-4
   -- prove fails (similar message with 919 in comment #0)
7) git bz apply 18942
   -- interactive just the actual fix
8) repeat steps 1-4
   -- works
9) run koha qa test tools

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 7 Jonathan Druart 2017-07-17 16:47:02 UTC
Login with DB user is not allowed, the only 2 available actions are 1. Create a patron and 2. Set the superlibrarian permission
Comment 8 Jonathan Druart 2017-07-17 16:48:41 UTC
Created attachment 65078 [details] [review]
Bug 18942: Simplify syntax
Comment 9 Tomás Cohen Arazi 2017-07-17 17:49:59 UTC
Created attachment 65079 [details] [review]
Bug 18942: Add test case to prove change

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Tomás Cohen Arazi 2017-07-17 17:50:05 UTC
Created attachment 65080 [details] [review]
Bug 18942: Internal Server Error symptomatic of using system user

TEST PLAN
---------
1) sudo koha-shell -c bash kohadev
2) prove -v t/Budgets/CanUserUseBudget.t
   -- works
3) prove -v t/Budgets/CanUserModifyBudget.t
   -- works
4) exit
5) git bz apply 18942
   -- interactive just the test patch
6) repeat steps 1-4
   -- prove fails (similar message with 919 in comment #0)
7) git bz apply 18942
   -- interactive just the actual fix
8) repeat steps 1-4
   -- works
9) run koha qa test tools

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Tomás Cohen Arazi 2017-07-17 17:50:10 UTC
Created attachment 65081 [details] [review]
Bug 18942: Simplify syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 12 Tomás Cohen Arazi 2017-07-17 17:50:18 UTC
Created attachment 65082 [details] [review]
Bug 18942: (QA followup) Add new tests descriptions

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 13 Jonathan Druart 2017-07-17 19:13:46 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 14 Fridolin Somers 2017-07-27 14:50:22 UTC
Not pushed to 17.05.x because depends on Bug 17829