Skip to content

Commit e7991c2

Browse files
committed
chore: Remove test_ssl_only test
Ticket: QA-862 Signed-off-by: Bahaa Aldeen Ghazal <[email protected]>
1 parent 818beb8 commit e7991c2

File tree

2 files changed

+0
-200
lines changed

2 files changed

+0
-200
lines changed

tests/production_test_env.py

Lines changed: 0 additions & 144 deletions
This file was deleted.

tests/tests/test_security.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -53,62 +53,6 @@ def do_test_token_token_expiration(self, env, valid_image_with_mender_conf):
5353

5454

5555
class TestSecurityOpenSource(BaseTestSecurity):
56-
def test_ssl_only(self, running_custom_production_setup):
57-
""" make sure we are not exposing any non-ssl connections in production environment """
58-
done = False
59-
sleep_time = 2
60-
# start production environment
61-
subprocess.call(
62-
[
63-
"./production_test_env.py",
64-
"--start",
65-
"--docker-compose-instance",
66-
running_custom_production_setup.name,
67-
]
68-
)
69-
70-
try:
71-
72-
# get all exposed ports from docker
73-
74-
for _ in range(3):
75-
exposed_hosts = subprocess.check_output(
76-
"docker ps | grep %s | grep -o -E '0.0.0.0:[0-9]*' | cat"
77-
% running_custom_production_setup.name,
78-
shell=True,
79-
).decode()
80-
81-
try:
82-
for host in exposed_hosts.split():
83-
with contextlib.closing(
84-
ssl.SSLContext().wrap_socket(socket.socket())
85-
) as sock:
86-
logger.info("%s: connect to host with TLS" % host)
87-
host, port = host.split(":")
88-
sock.connect((host, int(port)))
89-
done = True
90-
except:
91-
sleep_time *= 2
92-
time.sleep(sleep_time)
93-
continue
94-
95-
if done:
96-
break
97-
98-
if not done:
99-
pytest.fail("failed to connect to production env. using SSL")
100-
101-
finally:
102-
# tear down production env
103-
subprocess.call(
104-
[
105-
"./production_test_env.py",
106-
"--kill",
107-
"--docker-compose-instance",
108-
running_custom_production_setup.name,
109-
]
110-
)
111-
11256
def test_token_token_expiration(
11357
self, standard_setup_with_short_lived_token, valid_image_with_mender_conf
11458
):

0 commit comments

Comments
 (0)