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

Method test_get_credentials_file

component-tests/test_token.py:18–27  ·  view source on GitHub ↗
(self, tmp_path, component_tests_config)

Source from the content-addressed store, hash-verified

16 assert parse_token(config.get_token()) == parse_token(output.stdout)
17
18 def test_get_credentials_file(self, tmp_path, component_tests_config):
19 config = component_tests_config()
20 tunnel_id = config.get_tunnel_id()
21
22 cred_file = tmp_path / "test_get_credentials_file.json"
23 token_args = ["--origincert", cert_path(), "token", "--cred-file", cred_file, tunnel_id]
24 start_cloudflared(tmp_path, config, token_args)
25
26 with open(cred_file) as json_file:
27 assert config.get_credentials_json() == json.load(json_file)
28
29
30def cert_path():

Callers

nothing calls this directly

Calls 5

start_cloudflaredFunction · 0.90
component_tests_configFunction · 0.85
get_tunnel_idMethod · 0.80
get_credentials_jsonMethod · 0.80
cert_pathFunction · 0.70

Tested by

no test coverage detected