diff options
author | Aram Drevekenin <aram@poor.dev> | 2019-10-16 18:40:41 +0200 |
---|---|---|
committer | Aram Drevekenin <aram@poor.dev> | 2019-10-16 18:40:41 +0200 |
commit | 5bf79ce29b8be65d06a1ebf63aedfab8478ba07a (patch) | |
tree | 78aaa269618fc9cb80f559d15b2b4f28c84da540 /src/tests/mod.rs | |
parent | 17b508b72a7c60dfde9892e60c14a53f2455a70f (diff) |
fix(sigwinch): block when waiting for signal
Diffstat (limited to 'src/tests/mod.rs')
-rw-r--r-- | src/tests/mod.rs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/tests/mod.rs b/src/tests/mod.rs index bf1bc1e..e02b4d5 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -73,6 +73,7 @@ fn basic_startup() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -81,6 +82,7 @@ fn basic_startup() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -123,6 +125,7 @@ fn one_packet_of_traffic() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -131,6 +134,7 @@ fn one_packet_of_traffic() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -185,6 +189,7 @@ fn bi_directional_traffic() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -193,6 +198,7 @@ fn bi_directional_traffic() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -245,6 +251,7 @@ fn multiple_packets_of_traffic_from_different_connections() { terminal_height, ); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); @@ -253,6 +260,7 @@ fn multiple_packets_of_traffic_from_different_connections() { network_frames, get_open_sockets, on_winch, + cleanup, keyboard_events, lookup_addr, }; @@ -309,6 +317,7 @@ fn multiple_packets_of_traffic_from_single_connection() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -317,6 +326,7 @@ fn multiple_packets_of_traffic_from_single_connection() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -371,6 +381,7 @@ fn one_process_with_multiple_connections() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -379,6 +390,7 @@ fn one_process_with_multiple_connections() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -447,6 +459,7 @@ fn multiple_processes_with_multiple_connections() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -455,6 +468,7 @@ fn multiple_processes_with_multiple_connections() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -509,6 +523,7 @@ fn multiple_connections_from_remote_ip() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -517,6 +532,7 @@ fn multiple_connections_from_remote_ip() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -573,6 +589,7 @@ fn sustained_traffic_from_one_process() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -581,6 +598,7 @@ fn sustained_traffic_from_one_process() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -651,6 +669,7 @@ fn sustained_traffic_from_multiple_processes() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -659,6 +678,7 @@ fn sustained_traffic_from_multiple_processes() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -757,6 +777,7 @@ fn sustained_traffic_from_multiple_processes_bi_directional() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -765,6 +786,7 @@ fn sustained_traffic_from_multiple_processes_bi_directional() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -876,6 +898,7 @@ fn traffic_with_host_names() { ); let lookup_addr = create_fake_lookup_addr(ips_to_hostnames); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -884,6 +907,7 @@ fn traffic_with_host_names() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -929,6 +953,7 @@ fn traffic_with_winch_event() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(true); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -937,6 +962,7 @@ fn traffic_with_winch_event() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -1006,6 +1032,7 @@ fn layout_full_width_under_30_height() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -1014,6 +1041,7 @@ fn layout_full_width_under_30_height() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -1082,6 +1110,7 @@ fn layout_under_150_width_full_height() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -1090,6 +1119,7 @@ fn layout_under_150_width_full_height() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -1158,6 +1188,7 @@ fn layout_under_150_width_under_30_height() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -1166,6 +1197,7 @@ fn layout_under_150_width_under_30_height() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -1234,6 +1266,7 @@ fn layout_under_120_width_full_height() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -1242,6 +1275,7 @@ fn layout_under_120_width_full_height() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); @@ -1310,6 +1344,7 @@ fn layout_under_120_width_under_30_height() { let network_interface = get_interface(); let lookup_addr = create_fake_lookup_addr(HashMap::new()); let on_winch = create_fake_on_winch(false); + let cleanup = Box::new(|| {}); let os_input = crate::OsInput { network_interface, @@ -1318,6 +1353,7 @@ fn layout_under_120_width_under_30_height() { keyboard_events, lookup_addr, on_winch, + cleanup, }; crate::start(backend, os_input); |