Skip to content

Commit a7bd571

Browse files
author
vshepard
committed
Add env variable TESTGRES_SKIP_SSL
1 parent 1e8d912 commit a7bd571

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testgres/operations/os_ops.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import getpass
22
import locale
3+
import os
34
import sys
45

56
try:
@@ -12,7 +13,7 @@
1213

1314

1415
class ConnectionParams:
15-
def __init__(self, host='127.0.0.1', port=None, ssh_key=None, username=None, remote=False, skip_ssl=False):
16+
def __init__(self, host='127.0.0.1', port=None, ssh_key=None, username=None, remote=False, skip_ssl=None):
1617
"""
1718
skip_ssl: if is True, the connection is established without SSL.
1819
"""
@@ -21,6 +22,8 @@ def __init__(self, host='127.0.0.1', port=None, ssh_key=None, username=None, rem
2122
self.port = port
2223
self.ssh_key = ssh_key
2324
self.username = username
25+
if not skip_ssl:
26+
skip_ssl = os.getenv("TESTGRES_SKIP_SSL", False)
2427
self.skip_ssl = skip_ssl
2528

2629

0 commit comments

Comments
 (0)