From 3853594108dc0686aeeeb7eecc9ea340b479fabc Mon Sep 17 00:00:00 2001 From: Piotr Sarna Date: Tue, 7 Jan 2020 11:54:18 +0100 Subject: [PATCH] alternator-test: turn off TLS self-signed verification Two test cases did not ignore TLS self-signed warnings, which are used locally for testing HTTPS. Fixes #5557 Tests(test_health, test_authorization) Message-Id: <8bda759dc1597644c534f94d00853038c2688dd7.1578394444.git.sarna@scylladb.com> --- alternator-test/test_authorization.py | 4 ++-- alternator-test/test_health.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/alternator-test/test_authorization.py b/alternator-test/test_authorization.py index bd57c99690..a1852dfd7d 100644 --- a/alternator-test/test_authorization.py +++ b/alternator-test/test_authorization.py @@ -55,7 +55,7 @@ def test_expired_signature(dynamodb, test_table): 'X-Amz-Target': 'DynamoDB_20120810.DescribeEndpoints', 'Authorization': 'AWS4-HMAC-SHA256 Credential=alternator/2/3/4/aws4_request SignedHeaders=x-amz-date;host Signature=123' } - response = requests.post(url, headers=headers) + response = requests.post(url, headers=headers, verify=False) assert not response.ok assert "InvalidSignatureException" in response.text and "Signature expired" in response.text @@ -69,6 +69,6 @@ def test_signature_too_futuristic(dynamodb, test_table): 'X-Amz-Target': 'DynamoDB_20120810.DescribeEndpoints', 'Authorization': 'AWS4-HMAC-SHA256 Credential=alternator/2/3/4/aws4_request SignedHeaders=x-amz-date;host Signature=123' } - response = requests.post(url, headers=headers) + response = requests.post(url, headers=headers, verify=False) assert not response.ok assert "InvalidSignatureException" in response.text and "Signature not yet current" in response.text diff --git a/alternator-test/test_health.py b/alternator-test/test_health.py index c412e2db4c..57669bf30a 100644 --- a/alternator-test/test_health.py +++ b/alternator-test/test_health.py @@ -31,5 +31,5 @@ def test_health_only_works_for_root_path(dynamodb): url = dynamodb.meta.client._endpoint.host for suffix in ['/abc', '/-', '/index.htm', '/health']: print(url + suffix) - response = requests.get(url + suffix) + response = requests.get(url + suffix, verify=False) assert response.status_code in range(400, 405)