From 63d73b26da59366fc122bc15e64d3659be75e251 Mon Sep 17 00:00:00 2001 From: Nashwan Azhari Date: Tue, 17 Dec 2024 14:59:14 +0200 Subject: [PATCH] integration: rename `open_local_port()` testing utility for clarity. Signed-off-by: Nashwan Azhari --- tests/integration/tests/test_util/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/tests/test_util/util.py b/tests/integration/tests/test_util/util.py index f1d0d31b28..1ffaeeb117 100644 --- a/tests/integration/tests/test_util/util.py +++ b/tests/integration/tests/test_util/util.py @@ -519,7 +519,7 @@ def find_suitable_cidr(parent_cidr: str, excluded_ips: List[str]): @contextlib.contextmanager -def open_port( +def open_local_port( port: int, host: str = "", address_family: socket.AddressFamily = socket.AF_INET, @@ -527,7 +527,7 @@ def open_port( max_backlogged_connections: int = 0, ): """Context manager which opens a socket with the given properties - and binds it to the given port. + and binds it to the given port on the host this function is being run. Yields the already setup and listening socket object for use.