MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_http_remote_config_builder

Function test_http_remote_config_builder

atomic-remote/src/http/tests.rs:82–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80
81#[test]
82fn test_http_remote_config_builder() {
83 let config = HttpRemoteConfig::new()
84 .with_timeout(Duration::from_secs(60))
85 .with_connect_timeout(Duration::from_secs(20))
86 .danger_accept_invalid_certs(true)
87 .with_header("Authorization", "Bearer token");
88
89 assert_eq!(config.timeout, Duration::from_secs(60));
90 assert_eq!(config.connect_timeout, Duration::from_secs(20));
91 assert!(config.danger_accept_invalid_certs);
92 assert_eq!(config.extra_headers.len(), 1);
93 assert_eq!(config.extra_headers[0].0, "Authorization");
94 assert_eq!(config.extra_headers[0].1, "Bearer token");
95}
96
97#[test]
98fn test_infer_repo_name_project_code() {

Callers

nothing calls this directly

Calls 4

with_connect_timeoutMethod · 0.80
with_headerMethod · 0.45
with_timeoutMethod · 0.45

Tested by

no test coverage detected