@@ -108,17 +108,23 @@ fn check_set_identity_gateway_config() {
108108 edge_device_identity_key_file_path. to_str( ) . unwrap( ) ,
109109 edge_device_identity_key_file_out_path
110110 ) ) ;
111- assert ! ( std:: path:: Path :: new( hosts_file_out_path)
112- . try_exists( )
113- . is_ok_and( |exists| exists) ) ;
111+ assert ! (
112+ std:: path:: Path :: new( hosts_file_out_path)
113+ . try_exists( )
114+ . is_ok_and( |exists| exists)
115+ ) ;
114116
115- assert ! ( std:: fs:: read_to_string( hosts_file_out_path)
116- . unwrap( )
117- . contains( "127.0.1.1 my-omnect-iotedge-gateway-device" ) ) ;
117+ assert ! (
118+ std:: fs:: read_to_string( hosts_file_out_path)
119+ . unwrap( )
120+ . contains( "127.0.1.1 my-omnect-iotedge-gateway-device" )
121+ ) ;
118122
119- assert ! ( std:: fs:: read_to_string( hostname_file_out_path)
120- . unwrap( )
121- . contains( "my-omnect-iotedge-gateway-device" ) ) ;
123+ assert ! (
124+ std:: fs:: read_to_string( hostname_file_out_path)
125+ . unwrap( )
126+ . contains( "my-omnect-iotedge-gateway-device" )
127+ ) ;
122128}
123129
124130#[ test]
@@ -185,13 +191,17 @@ fn check_set_identity_leaf_config() {
185191 root_ca_file_out_path
186192 ) ) ;
187193
188- assert ! ( std:: fs:: read_to_string( hosts_file_out_path)
189- . unwrap( )
190- . contains( "127.0.1.1 my-omnect-iot-leaf-device" ) ) ;
194+ assert ! (
195+ std:: fs:: read_to_string( hosts_file_out_path)
196+ . unwrap( )
197+ . contains( "127.0.1.1 my-omnect-iot-leaf-device" )
198+ ) ;
191199
192- assert ! ( std:: fs:: read_to_string( hostname_file_out_path)
193- . unwrap( )
194- . contains( "my-omnect-iot-leaf-device" ) ) ;
200+ assert ! (
201+ std:: fs:: read_to_string( hostname_file_out_path)
202+ . unwrap( )
203+ . contains( "my-omnect-iot-leaf-device" )
204+ ) ;
195205}
196206
197207#[ test]
@@ -247,13 +257,17 @@ fn check_set_identity_config_est_template() {
247257 config_file_out_path
248258 ) ) ;
249259
250- assert ! ( std:: fs:: read_to_string( hosts_file_out_path)
251- . unwrap( )
252- . contains( "127.0.1.1 test-omnect-est" ) ) ;
260+ assert ! (
261+ std:: fs:: read_to_string( hosts_file_out_path)
262+ . unwrap( )
263+ . contains( "127.0.1.1 test-omnect-est" )
264+ ) ;
253265
254- assert ! ( std:: fs:: read_to_string( hostname_file_out_path)
255- . unwrap( )
256- . contains( "test-omnect-est" ) ) ;
266+ assert ! (
267+ std:: fs:: read_to_string( hostname_file_out_path)
268+ . unwrap( )
269+ . contains( "test-omnect-est" )
270+ ) ;
257271}
258272
259273#[ test]
@@ -323,13 +337,17 @@ fn check_set_identity_config_payload_template() {
323337 payload_out_path
324338 ) ) ;
325339
326- assert ! ( std:: fs:: read_to_string( hosts_file_out_path)
327- . unwrap( )
328- . contains( "127.0.1.1 test-omnect-est-with-payload" ) ) ;
340+ assert ! (
341+ std:: fs:: read_to_string( hosts_file_out_path)
342+ . unwrap( )
343+ . contains( "127.0.1.1 test-omnect-est-with-payload" )
344+ ) ;
329345
330- assert ! ( std:: fs:: read_to_string( hostname_file_out_path)
331- . unwrap( )
332- . contains( "test-omnect-est-with-payload" ) ) ;
346+ assert ! (
347+ std:: fs:: read_to_string( hostname_file_out_path)
348+ . unwrap( )
349+ . contains( "test-omnect-est-with-payload" )
350+ ) ;
333351}
334352
335353#[ test]
@@ -385,13 +403,17 @@ fn check_set_identity_config_tpm_template() {
385403 config_file_out_path
386404 ) ) ;
387405
388- assert ! ( std:: fs:: read_to_string( hosts_file_out_path)
389- . unwrap( )
390- . contains( "127.0.1.1 test-omnect-tpm" ) ) ;
406+ assert ! (
407+ std:: fs:: read_to_string( hosts_file_out_path)
408+ . unwrap( )
409+ . contains( "127.0.1.1 test-omnect-tpm" )
410+ ) ;
391411
392- assert ! ( std:: fs:: read_to_string( hostname_file_out_path)
393- . unwrap( )
394- . contains( "test-omnect-tpm" ) ) ;
412+ assert ! (
413+ std:: fs:: read_to_string( hostname_file_out_path)
414+ . unwrap( )
415+ . contains( "test-omnect-tpm" )
416+ ) ;
395417}
396418
397419#[ test]
@@ -1009,31 +1031,36 @@ async fn check_ssh_tunnel_setup() {
10091031 . await
10101032 . unwrap ( ) ;
10111033
1012- assert ! ( tr
1013- . pathbuf( )
1014- . join( "config" )
1015- . try_exists( )
1016- . is_ok_and( |exists| exists) ) ;
1017- assert ! ( tr
1018- . pathbuf( )
1019- . join( "id_ed25519" )
1020- . try_exists( )
1021- . is_ok_and( |exists| exists) ) ;
1022- assert ! ( tr
1023- . pathbuf( )
1024- . join( "id_ed25519.pub" )
1025- . try_exists( )
1026- . is_ok_and( |exists| exists) ) ;
1027- assert ! ( tr
1028- . pathbuf( )
1029- . join( "bastion-cert.pub" )
1030- . try_exists( )
1031- . is_ok_and( |exists| exists) ) ;
1032- assert ! ( tr
1033- . pathbuf( )
1034- . join( "device-cert.pub" )
1035- . try_exists( )
1036- . is_ok_and( |exists| exists) ) ;
1034+ assert ! (
1035+ tr. pathbuf( )
1036+ . join( "config" )
1037+ . try_exists( )
1038+ . is_ok_and( |exists| exists)
1039+ ) ;
1040+ assert ! (
1041+ tr. pathbuf( )
1042+ . join( "id_ed25519" )
1043+ . try_exists( )
1044+ . is_ok_and( |exists| exists)
1045+ ) ;
1046+ assert ! (
1047+ tr. pathbuf( )
1048+ . join( "id_ed25519.pub" )
1049+ . try_exists( )
1050+ . is_ok_and( |exists| exists)
1051+ ) ;
1052+ assert ! (
1053+ tr. pathbuf( )
1054+ . join( "bastion-cert.pub" )
1055+ . try_exists( )
1056+ . is_ok_and( |exists| exists)
1057+ ) ;
1058+ assert ! (
1059+ tr. pathbuf( )
1060+ . join( "device-cert.pub" )
1061+ . try_exists( )
1062+ . is_ok_and( |exists| exists)
1063+ ) ;
10371064
10381065 let ssh_config = std:: fs:: read_to_string ( tr. pathbuf ( ) . join ( "config" ) ) . unwrap ( ) ;
10391066 let expected_config = format ! (
0 commit comments