Bug 18526 - Test t/Token.t fails on master
Summary: Test t/Token.t fails on master
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Chris Cormack
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-03 01:30 UTC by Mason James
Modified: 2017-12-07 22:16 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mason James 2017-05-03 01:30:16 UTC
this seems to fail on 16.11.x and 16.05.x too

can anyone else verify this please

--------------------
$ prove  t/Token.t
1..10
ok 1 - Generate without parameters
ok 2 - Token :|%}VN^o\GFJ~fz~U.L7 has 20 chars
Use of uninitialized value $csrftoken in concatenation (.) or string at t/Token.t line 38.
ok 3 - Token  should not be empty
ok 4 - Check without any parameters
not ok 5 - CSRF token verified
#   Failed test 'CSRF token verified'
#   at t/Token.t line 44.
#          got: undef
#     expected: '1'
ok 6 - This token is no CSRF token
not ok 7 - CSRF token still valid within one second
#   Failed test 'CSRF token still valid within one second'
#   at t/Token.t line 56.
#          got: undef
#     expected: '1'
ok 8 - CSRF token expired after one second
# Subtest: Same id (cookie CGISESSID) with an other logged in user
    1..2
    not ok 1 - CSRF token verified
    #   Failed test 'CSRF token verified'
    #   at t/Token.t line 69.
    #          got: undef
    #     expected: '1'
    not ok 2 - CSRF token is not verified if another logged in user is using the same id
    #   Failed test 'CSRF token is not verified if another logged in user is using the same id'
    #   at t/Token.t line 74.
    #          got: undef
    #     expected: ''
    # Looks like you failed 2 tests of 2.
not ok 9 - Same id (cookie CGISESSID) with an other logged in user
#   Failed test 'Same id (cookie CGISESSID) with an other logged in user'
#   at t/Token.t line 75.
# Subtest: Same logged in user with another session (cookie CGISESSID)
    1..2
    not ok 1 - CSRF token verified
    #   Failed test 'CSRF token verified'
    #   at t/Token.t line 84.
    #          got: undef
    #     expected: '1'
    not ok 2 - CSRF token is not verified if another session is used
    #   Failed test 'CSRF token is not verified if another session is used'
    #   at t/Token.t line 90.
    #          got: undef
    #     expected: ''
    # Looks like you failed 2 tests of 2.
not ok 10 - Same logged in user with another session (cookie CGISESSID)
#   Failed test 'Same logged in user with another session (cookie CGISESSID)'
#   at t/Token.t line 91.
# Looks like you failed 4 tests of 10.
Comment 1 Marcel de Rooy 2017-05-03 14:07:10 UTC
Title of this report is misleading. The test does not fail on master (at least not with me).
Comment 2 Mason James 2017-05-08 02:29:13 UTC
(In reply to Marcel de Rooy from comment #1)
> Title of this report is misleading. The test does not fail on master (at
> least not with me).

Oops, looks like I had my PERL5LIB set incorrectly here..

I've confirmed the bug is invalid, thanks for testing Marcel!