()
| 80 | |
| 81 | #[test] |
| 82 | fn 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] |
| 98 | fn test_infer_repo_name_project_code() { |
nothing calls this directly
no test coverage detected