Skip to content

Commit

Permalink
Add integration test for TABPY_MINIMUM_TLS_VERSION not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeichikawasalesforce committed Jun 20, 2024
1 parent 371c11f commit cd50e9e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/integration/test_minimum_tls_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ def _get_config_file_name(self, tls_version: str) -> str:
"TABPY_TRANSFER_PROTOCOL = https\n"
"TABPY_CERTIFICATE_FILE = ./tests/integration/resources/2019_04_24_to_3018_08_25.crt\n"
"TABPY_KEY_FILE = ./tests/integration/resources/2019_04_24_to_3018_08_25.key\n"
f"TABPY_MINIMUM_TLS_VERSION = {tls_version}"
)

if tls_version is not None:
config_file.write(f"TABPY_MINIMUM_TLS_VERSION = {tls_version}")

pwd_file = self._get_pwd_file()
if pwd_file is not None:
pwd_file = os.path.abspath(pwd_file)
Expand All @@ -41,3 +44,11 @@ def test_minimum_tls_version_invalid(self):
log_contents = self._get_log_contents()
self.assertIn("Unrecognized value for TABPY_MINIMUM_TLS_VERSION", log_contents)
self.assertIn("Setting minimum TLS version to TLSv1_2", log_contents)

class TestMinimumTLSVersionNotSpecified(TestMinimumTLSVersion):
def _get_config_file_name(self) -> str:
return super()._get_config_file_name(None)

def test_minimum_tls_version_invalid(self):
log_contents = self._get_log_contents()
self.assertIn("Setting minimum TLS version to TLSv1_2", log_contents)

0 comments on commit cd50e9e

Please sign in to comment.