[Bug 29353] New: Auth API tests can fail
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29353 Bug ID: 29353 Summary: Auth API tests can fail Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@bugs.koha-community.org I usually run `qa` with --run-tests as root. Tests are setting SessionStorage=tmp so you end up with root only permissions on the tmp directory: root@kohadevbox:koha(master)$ ls -l /var/lib/koha/kohadev/tmp/ drwxr-xr-x 2 root root 4096 Oct 28 12:02 cgisess_koha_kohadev And some REST API auth tests fail: t/db_dependent/api/v1/auth.t ........................... # Failed test '403 Forbidden' # at t/db_dependent/api/v1/auth.t line 75. # got: '401' # expected: '403' # Failed test 'exact match for JSON Pointer "/error"' # at t/db_dependent/api/v1/auth.t line 75. # got: 'Session has been expired.' # expected: 'Authorization failure. Missing required permission(s).' # Looks like you failed 2 tests of 20. t/db_dependent/api/v1/auth.t ........................... 1/3 # Failed test 'under() tests' # at t/db_dependent/api/v1/auth.t line 108. t/db_dependent/api/v1/auth.t ........................... 3/3 # Looks like you failed 1 test of 3. t/db_dependent/api/v1/auth.t ........................... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/3 subtests t/db_dependent/api/v1/auth_authenticate_api_request.t .. 1/5 # Failed test '200 OK' # at t/db_dependent/api/v1/auth_authenticate_api_request.t line 131. # got: '401' # expected: '200' # Failed test 'The 'koha.user' object is defined in the stash' # at t/db_dependent/api/v1/auth_authenticate_api_request.t line 134. # Failed test 'userenv set correctly' # at t/db_dependent/api/v1/auth_authenticate_api_request.t line 137. # got: undef # expected: '141' # Failed test 'exact match for JSON Pointer ""' # at t/db_dependent/api/v1/auth_authenticate_api_request.t line 154. # Structures begin differing at: # $got->{error} = 'Session has been expired.' # $expected->{error} = 'Authentication failure.' # Looks like you failed 1 test of 3. # Failed test 'logged-out tests' # at t/db_dependent/api/v1/auth_authenticate_api_request.t line 157. # Looks like you planned 8 tests but ran 6. # Looks like you failed 4 tests of 6 run. # Failed test 'cookie-based tests' # at t/db_dependent/api/v1/auth_authenticate_api_request.t line 160. t/db_dependent/api/v1/auth_authenticate_api_request.t .. 4/5 # Looks like you failed 1 test of 5. t/db_dependent/api/v1/auth_authenticate_api_request.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/5 subtests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29353 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- The workaround is to remove the tmp directory /var/lib/koha/kohadev/tmp/cgisess_koha_kohadev/ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29353 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #1)
The workaround is to remove the tmp directory /var/lib/koha/kohadev/tmp/cgisess_koha_kohadev/
I will add the qa alias to the kshell env and discourage running as root. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29353 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Tomás Cohen Arazi from comment #2)
(In reply to Jonathan Druart from comment #1)
The workaround is to remove the tmp directory /var/lib/koha/kohadev/tmp/cgisess_koha_kohadev/
I will add the qa alias to the kshell env and discourage running as root.
I believe this has been done in ktd now :) Please reopen if you disagree. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org