MCPcopy Create free account
hub / github.com/cloudflare/cloudflared / run_service

Method run_service

component-tests/test_service.py:151–163  ·  view source on GitHub ↗
(self, tmp_path, config, root=False, use_token=False)

Source from the content-addressed store, hash-verified

149
150 @contextmanager
151 def run_service(self, tmp_path, config, root=False, use_token=False):
152 args = ["service", "install"]
153
154 if use_token:
155 args.append(config.get_token())
156
157 try:
158 service = start_cloudflared(
159 tmp_path, config, cfd_args=args, cfd_pre_args=[], capture_output=False, root=root, skip_config_flag=use_token)
160 yield service
161 finally:
162 start_cloudflared(
163 tmp_path, config, cfd_args=["service", "uninstall"], cfd_pre_args=[], capture_output=False, root=root, skip_config_flag=use_token)
164
165 def launchctl_cmd(self, action, success=True):
166 cmd = subprocess.run(

Callers 2

sysv_service_scenarioMethod · 0.95

Calls 2

start_cloudflaredFunction · 0.90
get_tokenMethod · 0.80

Tested by

no test coverage detected