()
| 432 | |
| 433 | #[test] |
| 434 | fn resolves_profile_values_with_overrides() { |
| 435 | let mut config = CodSpeedConfig::from_persisted(PersistedConfig::default()); |
| 436 | let profile = config.profile_mut("staging"); |
| 437 | profile.auth.token = Some("profile-token".into()); |
| 438 | profile.api_url = Some("https://gql.staging.example/".into()); |
| 439 | profile.upload_url = Some("https://api.staging.example/upload".into()); |
| 440 | |
| 441 | config |
| 442 | .resolve_selected_profile( |
| 443 | Some("staging"), |
| 444 | ConfigOverrides { |
| 445 | oauth_token: Some("override-token"), |
| 446 | api_url: Some("https://gql.override.example/"), |
| 447 | upload_url: None, |
| 448 | }, |
| 449 | false, |
| 450 | ) |
| 451 | .unwrap(); |
| 452 | |
| 453 | assert_eq!(config.selected_profile_name(), "staging"); |
| 454 | assert_eq!(config.auth.token.as_deref(), Some("override-token")); |
| 455 | assert_eq!(config.api_url, "https://gql.override.example/"); |
| 456 | assert_eq!(config.upload_url, "https://api.staging.example/upload"); |
| 457 | } |
| 458 | |
| 459 | #[test] |
| 460 | fn load_rewrites_legacy_file_in_canonical_form() { |
nothing calls this directly
no test coverage detected