MCPcopy Create free account
hub / github.com/apache/httpd / MDTestSetup

Class MDTestSetup

test/modules/md/md_env.py:25–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24
25class MDTestSetup(HttpdTestSetup):
26
27 def __init__(self, env: 'MDTestEnv'):
28 super().__init__(env=env)
29 self.mdenv = env
30 self.add_modules(["watchdog", "proxy_connect", "md"])
31
32 def make(self):
33 super().make()
34 if "pebble" == self.mdenv.acme_server:
35 self._make_pebble_conf()
36 self.mdenv.clear_store()
37
38 def _make_pebble_conf(self):
39 our_dir = os.path.dirname(inspect.getfile(MDTestSetup))
40 conf_src_dir = os.path.join(our_dir, 'pebble')
41 conf_dest_dir = os.path.join(self.env.gen_dir, 'pebble')
42 if not os.path.exists(conf_dest_dir):
43 os.makedirs(conf_dest_dir)
44 for name in os.listdir(conf_src_dir):
45 src_path = os.path.join(conf_src_dir, name)
46 m = re.match(r'(.+).template', name)
47 if m:
48 self._make_template(src_path, os.path.join(conf_dest_dir, m.group(1)))
49 elif os.path.isfile(src_path):
50 shutil.copy(src_path, os.path.join(conf_dest_dir, name))
51
52
53class MDTestEnv(HttpdTestEnv):

Callers 1

setup_httpdMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected