()
| 71 | |
| 72 | #[test] |
| 73 | fn 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] |
| 89 | fn test_infer_repo_name_project_code() { |
nothing calls this directly
no test coverage detected