Skip to content

Commit e3de02f

Browse files
[mq] working branch - merge 47d7aa7 on top of main at 283e3c6
{"baseBranch":"main","baseCommit":"283e3c62ea408a18104f7179cd60db26580485de","createdAt":"2026-02-05T17:40:03.996549Z","headSha":"47d7aa7890df32e6023847ce82c24ea8c0e1670b","id":"3b01375b-6de4-4dc3-b5a3-eabc0338890b","nextMergeabilityCheckAt":"2026-02-05T17:42:05.404387Z","priority":"200","pullRequestNumber":"1166","queuedAt":"2026-02-05T17:42:01.024614Z","status":"STATUS_QUEUED"}
2 parents 3fa1d9a + 47d7aa7 commit e3de02f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lib/saluki-env/src/autodiscovery/providers/local.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ impl LocalAutodiscoveryProvider {
7878

7979
#[derive(Debug, Deserialize)]
8080
struct LocalCheckConfig {
81+
#[serde(default)]
8182
init_config: HashMap<String, serde_yaml::Value>,
8283
instances: Vec<HashMap<String, serde_yaml::Value>>,
8384
}
@@ -274,6 +275,16 @@ mod tests {
274275
assert_eq!(config.source, "local");
275276
}
276277

278+
#[tokio::test]
279+
async fn test_parse_minimal_config_file() {
280+
let test_file = test_data_path().join("test-minimal-config.yaml");
281+
282+
let (_, config) = parse_config_file(&test_file).await.unwrap();
283+
284+
// Parsing a config without `init_config` yields an empty hash map for that field.
285+
assert!(config.init_config.value.is_empty());
286+
}
287+
277288
#[tokio::test]
278289
async fn test_scan_and_emit_events_new_config() {
279290
let dir = tempdir().unwrap();
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## This file is used for testing the parse_config_file function
2+
## Minimal test configuration
3+
4+
instances:
5+
-

0 commit comments

Comments
 (0)