From 67f588957930d354160cf34e1d9449382e6b71de Mon Sep 17 00:00:00 2001 From: Torsten Kilias Date: Thu, 25 Jan 2024 15:28:16 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Christoph Kuhnke --- test/unit/test_current_container_finder.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/unit/test_current_container_finder.py b/test/unit/test_current_container_finder.py index 8d29279..5090e07 100644 --- a/test/unit/test_current_container_finder.py +++ b/test/unit/test_current_container_finder.py @@ -68,8 +68,12 @@ def __init__(self, containers: List[Dict[str, str]], ip_addresses: List[str]): ) -def test_ips_in_ips_of_single_container(): +def test_single_container(): + """ + Verify finding a single container with all ip addresses exposed by its networks being contained in the given whitelist. + """ test_setup = TestSetup( + # each container is defined by a dict specifying its networks. containers=[ {"test1": "192.168.0.1", "test2": "192.168.1.1"}, {"test1": "192.168.2.1", "test2": "192.168.3.1"}, @@ -87,7 +91,7 @@ def test_ips_in_ips_of_single_container(): ) -def test_ips_not_in_container_ips(): +def test_no_matching_container(): test_setup = TestSetup( containers=[ {"test1": "192.168.0.1", "test2": "192.168.1.1"}, @@ -103,7 +107,7 @@ def test_ips_not_in_container_ips(): assert result == None -def test_ips_in_ips_of_multiple_container(): +def test_multiple_containers_matching(): test_setup = TestSetup( containers=[ {"test1": "192.168.0.1", "test2": "192.168.1.1"},