Fix some warnings (#2704)
maudoux@L520[~/lemonldap-ng/lemonldap-ng-portal](fix_warnings)$ prove -v t/36-Combination-with-Choice.t
t/36-Combination-with-Choice.t ..
ok 1 - use Lemonldap::NG::Portal::Main;
ok 2 - Portal object
ok 3 - Init
ok 4 - Portal app
ok 5 - Expression loaded: "[Dm] or [Ch]"
ok 6 - Try to connect with login dwho
ok 7 - Get cookie lemonldap (16b54e563456fe9c0fac98de7fb85b41d598ea842e4871eaefbd4b72b6c1a12b)
ok 8 - Logout request
ok 9 - Response is 200
ok 10 - Cookie is deleted
ok 11 - No pdata
ok 12 - Disconnect request
ok 13 - Response is 401
ok 14 - Try to connect with login dvador
ok 15 - Get cookie lemonldap (06313bec500e909a6595690f051388baa3bf7693b14cbd0b67bd4610af4ae186)
ok 16 - Logout request
ok 17 - Response is 200
ok 18 - Cookie is deleted
ok 19 - No pdata
ok 20 - Disconnect request
ok 21 - Response is 401
ok 22 - Portal object
ok 23 - Init
ok 24 - Portal app
ok 25 - Expression loaded: "[Dm] and [Ch]"
ok 26 - Try to connect with login rtyler
ok 27 - Get cookie lemonldap (7ffe096e4a55452e94a6cd77c9792190054d08aa2f3dfb66664b8ef37419068c)
ok 28 - Logout request
ok 29 - Response is 200
ok 30 - Cookie is deleted
ok 31 - No pdata
ok 32 - Disconnect request
ok 33 - Response is 401
ok 34 - Try to connect with login dwho
ok 35 - Get cookie lemonldap (6e7c0da4084e518c959009f1f6b0e955b828499b2ba83561bf89065f54017b57)
ok 36 - Logout request
ok 37 - Response is 200
ok 38 - Cookie is deleted
ok 39 - No pdata
ok 40 - Disconnect request
ok 41 - Response is 401
ok 42 - Try to connect with login dwho
ok 43 - Response status is 401
ok 44 - Content is JSON
ok 45 - Error code is 5
ok 46 - Portal object
ok 47 - Init
ok 48 - Portal app
ok 49 - Expression loaded: "if($env->{HTTP_X} eq "dwho") then [Dm] else [Ch]"
ok 50 - Try to connect with login dwho
ok 51 - Get cookie lemonldap (de491febf270e496ee3589bbc27092987b2f0ff89d853f9e8a0fd43825c15e06)
ok 52 - Logout request
ok 53 - Response is 200
ok 54 - Cookie is deleted
ok 55 - No pdata
ok 56 - Disconnect request
ok 57 - Response is 401
ok 58 - Try to connect with login dvador
ok 59 - Get cookie lemonldap (21a49c3f99f769c9450ba63c2a5f85fb5faf1ac2a02c224df9c2dcd1408f5cbf)
ok 60 - Logout request
ok 61 - Response is 200
ok 62 - Cookie is deleted
ok 63 - No pdata
ok 64 - Disconnect request
ok 65 - Response is 401
ok 66 - Portal object
ok 67 - Init
ok 68 - Portal app
ok 69 - Expression loaded: "if($env->{HTTP_X} eq "rtyler") then [Dm] and [Ch] else if($env->{HTTP_X} eq "dvador") then [Ch] else [Ch]"
ok 70 - Try to connect with login rtyler
ok 71 - Get cookie lemonldap (800016f16ea552d791035f2087b625eabf08b165bdd748a7f6b31876a5f6a14a)
ok 72 - Logout request
ok 73 - Response is 200
ok 74 - Cookie is deleted
ok 75 - No pdata
ok 76 - Disconnect request
ok 77 - Response is 401
ok 78 - Try to connect with login dvador
ok 79 - Get cookie lemonldap (a3a1cfb0e5ac367759d1852c84ebf480000069273e40e77ef50d39a070db6b63)
ok 80 - Logout request
ok 81 - Response is 200
ok 82 - Cookie is deleted
ok 83 - No pdata
ok 84 - Disconnect request
ok 85 - Response is 401
ok 86 - Try to connect with login dwho
ok 87 - Get cookie lemonldap (35f854eb915a22deb8687be78b8e275caa18a32e2853a08991ac0255688096aa)
ok 88 - Logout request
ok 89 - Response is 200
ok 90 - Cookie is deleted
ok 91 - No pdata
ok 92 - Disconnect request
ok 93 - Response is 401
ok 94 - Try to connect with login dwho
ok 95 - Response status is 401
ok 96 - Content is JSON
ok 97 - Error code is 5
1..97
ok
All tests successful.
Files=1, Tests=97, 1 wallclock secs ( 0.05 usr 0.00 sys + 0.74 cusr 0.05 csys = 0.84 CPU)
Result: PASS
maudoux@L520[~/lemonldap-ng/lemonldap-ng-portal](fix_warnings)$ prove -v t/79-2F-Yubikey.t
t/79-2F-Yubikey.t ..
ok 1 - use Lemonldap::NG::Portal::Main;
ok 2 - Portal object
ok 3 - Init
ok 4 - Portal app
ok 5 - Auth query
ok 6 - HTTP code is 200
ok 7 - Page contains a form
ok 8 - URI match
ok 9 - Field "token" is defined
ok 10 - Field "code" is defined
ok 11 - Post code
ok 12 - Bad OTP code
ok 13 - Auth query
ok 14 - HTTP code is 200
ok 15 - Page contains a form
ok 16 - URI match
ok 17 - Field "token" is defined
ok 18 - Field "code" is defined
ok 19 - Post code
ok 20 - Bad OTP code
ok 21 - Auth query
ok 22 - HTTP code is 200
ok 23 - Page contains a form
ok 24 - URI match
ok 25 - Field "token" is defined
ok 26 - Field "code" is defined
ok 27 - Post code
ok 28 - Get cookie lemonldap (d7f28305bb0380371d753282512f05c75e2c2d8e2016641717dc05737da2ac43)
ok 29 - Auth query
ok 30 - Get cookie lemonldap (fff43427f4b90c0b480fa1eb7403e8730a73a25eba264ff45eb8b5e89e51e783)
1..30
ok
All tests successful.
Files=1, Tests=30, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.49 cusr 0.03 csys = 0.55 CPU)
Result: PASS
maudoux@L520[~/lemonldap-ng/lemonldap-ng-portal](fix_warnings)$ prove -v t/01-WebAuthn.t
t/01-WebAuthn.t ..
ok 1 - use Lemonldap::NG::Portal::Main;
ok 2 - Portal object
ok 3 - Init
ok 4 - Portal app
ok 5 - Auth query
ok 6 - HTTP code is 200
ok 7 - HTTP code is 200
ok 8 - Page contains a form
ok 9 - URI match
ok 10 - Field "token" is defined
ok 11 - Field "credential" is defined
ok 12 - Found request object in JS data
ok 13 - Found challenge
ok 14 - Correct U2F AppID
ok 15 - Found only one allowed credentials
ok 16 - Correct credential ID
ok 17 - Correct public key
ok 18 - Auth query
ok 19 - Get cookie lemonldap (e3d52fa7093a10c1e03b967267f3f34cbfae6f995e94d24ce334ba5dcff379b3)
ok 20 - Logout request
ok 21 - Response is 200
ok 22 - Cookie is deleted
ok 23 - No pdata
ok 24 - Disconnect request
ok 25 - Response is 401
1..25
ok
All tests successful.
Files=1, Tests=25, 1 wallclock secs ( 0.02 usr 0.01 sys + 0.45 cusr 0.04 csys = 0.52 CPU)
Result: PASS
Edited by Christophe Maudoux