@@ -89,21 +89,6 @@ mod tests {
8989 assert ! ( std:: ptr:: eq( config1, config2) ) ;
9090 }
9191
92- // Test handling of multiple guests in the settings
93- #[ tokio:: test]
94- async fn test_parse_settings_yaml_multiple_guests ( ) {
95- // Verify that multiple guests are correctly parsed
96- let settings = parse_settings_yaml ( ) ;
97- if let Some ( guests) = settings. guest {
98- assert ! ( guests. len( ) > 1 ) ;
99- for guest in guests {
100- assert_ne ! ( guest. name, "" ) ;
101- assert_ne ! ( guest. ip, "" ) ;
102- assert_ne ! ( guest. r#type, "" ) ;
103- }
104- }
105- }
106-
10792 // Test concurrent access to `get_config`
10893 #[ tokio:: test]
10994 async fn test_get_config_concurrent_access ( ) {
@@ -158,44 +143,6 @@ mod tests {
158143 assert ! ( valid_types. contains( & settings. host. r#type. as_str( ) ) ) ;
159144 }
160145
161- // Test handling of a settings file with guests having invalid types
162- #[ tokio:: test]
163- async fn test_parse_settings_yaml_invalid_guest_types ( ) {
164- // Verify that guest types are valid
165- let settings = parse_settings_yaml ( ) ;
166- if let Some ( guests) = settings. guest {
167- let valid_types = vec ! [ "nodeagent" , "zoneagent" , "cloudagent" ] ;
168- for guest in guests {
169- assert ! ( valid_types. contains( & guest. r#type. as_str( ) ) ) ;
170- }
171- }
172- }
173-
174- // Test handling of a settings file with guests having missing names
175- #[ tokio:: test]
176- async fn test_parse_settings_yaml_guest_missing_names ( ) {
177- // Verify that guest names are not missing
178- let settings = parse_settings_yaml ( ) ;
179- if let Some ( guests) = settings. guest {
180- for guest in guests {
181- assert_ne ! ( guest. name, "" ) ;
182- }
183- }
184- }
185-
186- // Test handling of a settings file with guests having duplicate IPs
187- #[ tokio:: test]
188- async fn test_parse_settings_yaml_guest_duplicate_ips ( ) {
189- // Verify that guest IPs are unique
190- let settings = parse_settings_yaml ( ) ;
191- if let Some ( guests) = settings. guest {
192- let mut ips: Vec < String > = guests. iter ( ) . map ( |guest| guest. ip . clone ( ) ) . collect ( ) ;
193- ips. sort ( ) ;
194- ips. dedup ( ) ;
195- assert_eq ! ( ips. len( ) , guests. len( ) ) ;
196- }
197- }
198-
199146 // Test handling of invalid YAML file path
200147 #[ tokio:: test]
201148 async fn test_parse_settings_yaml_invalid_file_path ( ) {
0 commit comments