Commit a08d7d66 authored by Łukasz Nowak's avatar Łukasz Nowak

Revert "software/caddy-frontend: Add test for services auto-restart."

This reverts commit 6eec01b7.

The test_supervisor_state run on each test case has exactly the same
functionality, so just drop not needed additional test.
parent 5c20538e
......@@ -4009,62 +4009,3 @@ class TestDuplicateSiteKeyProtection(SlaveHttpFrontendTestCase, TestDataMixin):
},
parameter_dict
)
class AutoRestartTestCase(SlaveHttpFrontendTestCase):
@classmethod
def getInstanceParameterDict(cls):
return {
'-frontend-1-state': 'stopped',
}
@classmethod
def getSlaveParameterDictDict(cls):
return {
'test': {
'url': cls.backend_url,
},
}
@staticmethod
def generateHashFromFiles(file_list):
import hashlib
hasher = hashlib.md5()
for path in file_list:
with open(path, 'r') as afile:
buf = afile.read()
hasher.update("%s\n" % len(buf))
hasher.update(buf)
hash = hasher.hexdigest()
return hash
def test_hashes(self):
hash_files = [
'software_release/buildout.cfg',
]
expected_process_names = [
'frontend_caddy-{hash}-on-watch',
'frontend_nginx-{hash}-on-watch',
'trafficserver-{hash}-on-watch',
'certificate_authority-{hash}-on-watch',
'crond-{hash}',
'6tunnel-8081-{hash}-on-watch',
'6tunnel-4443-{hash}-on-watch',
'6tunnel-8080-{hash}-on-watch',
'6tunnel-9443-{hash}-on-watch',
'6tunnel-26011-{hash}-on-watch',
'6tunnel-26012-{hash}-on-watch',
]
supervisor = self.getSupervisorRPCServer().supervisor
process_names = [process['name']
for process in supervisor.getAllProcessInfo()]
hash_files = [os.path.join(self.computer_partition_root_path, path)
for path in hash_files]
for name in expected_process_names:
h = self.generateHashFromFiles(hash_files)
expected_process_name = name.format(hash=h)
self.assertIn(expected_process_name, process_names)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment