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:73–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71
72#[test]
73fn test_http_remote_config_builder() {
74 let config = HttpRemoteConfig::new()
75 .with_timeout(Duration::from_secs(60))
76 .with_connect_timeout(Duration::from_secs(20))
77 .danger_accept_invalid_certs(true)
78 .with_header("Authorization", "Bearer token");
79
80 assert_eq!(config.timeout, Duration::from_secs(60));
81 assert_eq!(config.connect_timeout, Duration::from_secs(20));
82 assert!(config.danger_accept_invalid_certs);
83 assert_eq!(config.extra_headers.len(), 1);
84 assert_eq!(config.extra_headers[0].0, "Authorization");
85 assert_eq!(config.extra_headers[0].1, "Bearer token");
86}
87
88#[test]
89fn 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