Skip to content

Commit

Permalink
integration: rename open_local_port() testing utility for clarity.
Browse files Browse the repository at this point in the history
Signed-off-by: Nashwan Azhari <[email protected]>
  • Loading branch information
Nashwan Azhari committed Dec 17, 2024
1 parent f7f7b0d commit 63d73b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/tests/test_util/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,15 +519,15 @@ 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,
socket_kind: socket.SocketKind = socket.SOCK_STREAM,
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.
Expand Down

0 comments on commit 63d73b2

Please sign in to comment.