From c0aea0ef182e9e20119af08427c9d9dfd50c8308 Mon Sep 17 00:00:00 2001 From: Sebastian Holmin Date: Tue, 14 Jan 2025 14:35:18 +0100 Subject: [PATCH] Improve test and docs --- test/test-manager/src/config/manifest.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/test-manager/src/config/manifest.rs b/test/test-manager/src/config/manifest.rs index f6ee47f85494..51386f68ed0f 100644 --- a/test/test-manager/src/config/manifest.rs +++ b/test/test-manager/src/config/manifest.rs @@ -81,9 +81,6 @@ mod locations { pub struct TestLocationList(pub Vec); impl TestLocationList { - // TODO: Consider if we should handle the case of an empty list by returning vec!["any"] - /// Look up a test (by name) and see if there are any locations - /// that we should use. pub fn lookup(&self, test: &str) -> Option<&Vec> { self.0 .iter() @@ -173,12 +170,17 @@ mod tests { "vms": {}, "mullvad_host": "mullvad.net", "test_locations": [ - { "daita": [ "se-got-wg-001", "se-got-wg-002" ] }, + { "*daita": [ "se-got-wg-001", "se-got-wg-002" ] }, { "*": [ "se" ] } ] }"#; let config: Config = serde_json::from_str(config).unwrap(); + assert!(config + .test_locations + .lookup("test_daita") + .unwrap() + .contains(&"se-got-wg-002".to_string())); assert!(!config.test_locations.0.is_empty()); } }