Bug #2509
Bug #2500: Doesn't work on Splunk 8.0
Test failures related to NTLM
Start date:
11/11/2019
Due date:
% Done:
100%
Associated revisions
Updating MD4 to work on Python 3
Reference #2509
Fixing NTLM issues with the test server
Reference #2509
Making tests no longer swallow exceptions
Reference #2509
Reaplcing the MD4 implementation with one that works on Python 3
Reference #2509
History
#1 Updated by Luke Murphey about 5 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
#2 Updated by Luke Murphey about 5 years ago
- Status changed from Closed to In Progress
- % Done changed from 100 to 50
[exec] ====================================================================== [exec] FAIL: test_determine_auth_method_ntlm (__main__.TestWebPing) [exec] ---------------------------------------------------------------------- [exec] Traceback (most recent call last): [exec] File "unit.py", line 166, in _decorator [exec] return func(self, *args, **kwargs) [exec] File "unit.py", line 417, in test_determine_auth_method_ntlm [exec] self.assertEqual(auth_type, WebPing.HTTP_AUTH_NTLM) [exec] AssertionError: None != 'ntlm' [exec] [exec] ====================================================================== [exec] FAIL: test_determine_auth_method_ntlm_comma_header (__main__.TestWebPing) [exec] ---------------------------------------------------------------------- [exec] Traceback (most recent call last): [exec] File "unit.py", line 166, in _decorator [exec] return func(self, *args, **kwargs) [exec] File "unit.py", line 426, in test_determine_auth_method_ntlm_comma_header [exec] self.assertEqual(auth_type, WebPing.HTTP_AUTH_NTLM) [exec] AssertionError: None != 'ntlm' [exec] [exec] ====================================================================== [exec] FAIL: test_ping_over_proxy (__main__.TestWebPing) [exec] ---------------------------------------------------------------------- [exec] Traceback (most recent call last): [exec] File "unit.py", line 37, in _decorator [exec] return func(self, *args, **kwargs) [exec] File "unit.py", line 326, in test_ping_over_proxy [exec] self.assertEqual(result.response_code, 200) [exec] AssertionError: 0 != 200 [exec] [exec] ====================================================================== [exec] FAIL: test_ping_with_ntlm_authentication (__main__.TestWebPing) [exec] ---------------------------------------------------------------------- [exec] Traceback (most recent call last): [exec] File "unit.py", line 166, in _decorator [exec] return func(self, *args, **kwargs) [exec] File "unit.py", line 361, in test_ping_with_ntlm_authentication [exec] self.assertEqual(result.response_code, 200) [exec] AssertionError: 0 != 200 [exec] [exec] ====================================================================== [exec] FAIL: test_ping_with_ntlm_authentication_missing_domain (__main__.TestWebPing) [exec] ---------------------------------------------------------------------- [exec] Traceback (most recent call last): [exec] File "unit.py", line 376, in test_ping_with_ntlm_authentication_missing_domain [exec] self.assertRaises(NTLMAuthenticationValueException, lambda: WebPing.ping( url_field.to_python("http://127.0.0.1:" + str(self.web_server_port) + "/ntlm_auth"), timeout=3, username="user", password="passwd")) [exec] AssertionError: NTLMAuthenticationValueException not raised by <lambda> [exec] [exec] ====================================================================== [exec] FAIL: test_ping_with_ntlm_negotiate_authentication (__main__.TestWebPing) [exec] ---------------------------------------------------------------------- [exec] Traceback (most recent call last): [exec] File "unit.py", line 166, in _decorator [exec] return func(self, *args, **kwargs) [exec] File "unit.py", line 370, in test_ping_with_ntlm_negotiate_authentication [exec] self.assertEqual(result.response_code, 200) [exec] AssertionError: 0 != 200
#3 Updated by Luke Murphey about 5 years ago
Questions:
- Why does this work locally but not on the CI system?
- It appears that the test on Linux are using Python 3 because I see "ResourceWarning: unclosed <socket.socket fd=6..."
- Does the HTTP messages show a different trace?
- Do I get the same errors on Python 3?
- I do
- Here is a functioning trace of TestWebPing.test_ping_with_ntlm_authentication:
test.run_unit: [exec] 127.0.0.1 - - [11/Nov/2019 21:55:29] "GET /ntlm_auth HTTP/1.1" 401 - [exec] 127.0.0.1 - - [11/Nov/2019 21:55:29] "GET /ntlm_auth HTTP/1.1" 401 - [exec] 127.0.0.1 - - [11/Nov/2019 21:55:29] "GET /ntlm_auth HTTP/1.1" 401 - [exec] 127.0.0.1 - - [11/Nov/2019 21:55:29] "GET /ntlm_auth HTTP/1.1" 200 - [exec] . [exec] ---------------------------------------------------------------------- [exec] Ran 1 test in 0.042s [exec] [exec] OK [exec] Waiting for web-server to start ... Done [exec] ('Authorization Header:', None) [exec] Performing initial NTLM auth [exec] ('Authorization Header:', None) [exec] Performing initial NTLM auth [exec] ('Authorization Header:', 'NTLM TlRMTVNTUAABAAAAB7IIogQABAA6AAAAEgASACgAAAAFASgKAAAAD0xNVVJQSEVZLU1CUC01N0YxNVVTRVI=') [exec] Performing NTLM auth challenge [exec] ('Authorization Header:', 'NTLM TlRMTVNTUAADAAAAGAAYAIAAAAAYABgAmAAAAAgACABIAAAADAAMAFAAAAAkACQAXAAAAAAAAACwAAAABYKIogUBKAoAAAAPVQBTAEUAUgBkAG8AbQBhAGkAbgBMAE0AVQBSAFAASABFAFkALQBNAEIAUAAtADUANwBGADEANQCOR1qd+aRHAtO883y1FZiXV+mht5VAw3TRUa8504UTOBvSBjRmcDRbwsvSkncGU5Y=') [exec] Completing NTLM auth
- Here is the failing state:
[exec] unit.py:113: ResourceWarning: unclosed file <_io.TextIOWrapper name='../local.properties' mode='r' encoding='UTF-8'> [exec] self.loadConfig() [exec] ResourceWarning: Enable tracemalloc to get the object allocation traceback [exec] 127.0.0.1 - - [11/Nov/2019 21:56:59] "GET /ntlm_auth HTTP/1.1" 401 - [exec] 127.0.0.1 - - [11/Nov/2019 21:56:59] "GET /ntlm_auth HTTP/1.1" 401 - [exec] 127.0.0.1 - - [11/Nov/2019 21:56:59] "GET /ntlm_auth HTTP/1.1" 401 - [exec] F [exec] ====================================================================== [exec] FAIL: test_ping_with_ntlm_authentication (__main__.TestWebPing) [exec] ---------------------------------------------------------------------- [exec] Traceback (most recent call last): [exec] File "unit.py", line 166, in _decorator [exec] return func(self, *args, **kwargs) [exec] File "unit.py", line 361, in test_ping_with_ntlm_authentication [exec] self.assertEqual(result.response_code, 200) [exec] AssertionError: 0 != 200 [exec] [exec] ---------------------------------------------------------------------- [exec] Ran 1 test in 20.070s [exec] [exec] FAILED (failures=1) [exec] Waiting for web-server to start ........ Done [exec] Authorization Header: None [exec] Performing initial NTLM auth [exec] Authorization Header: None [exec] Performing initial NTLM auth [exec] Authorization Header: NTLM TlRMTVNTUAABAAAAB7IIogQABAA6AAAAEgASACgAAAAFASgKAAAAD0xNVVJQSEVZLU1CUC01N0YxNVVTRVI= [exec] Performing NTLM auth challenge
- Changing the build target for "test.run" to python2 would likely make it pass
#4 Updated by Luke Murphey about 5 years ago
- Status changed from In Progress to Closed
- % Done changed from 50 to 100