Skip to content

Commit fd13d3e

Browse files
committed
fix(test): add dynamic_ip/reverse_dns/bgp attrs to MockProfile in m7 tests
_provision_and now reads these three fields from the profile object after WS-B; the integration test MockProfile was missing them, causing 8 failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018NsdPH4dcsbTWeTFuTgswY
1 parent 9ad375c commit fd13d3e

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

tests/integration/test_m7_ands.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ async def test_m7_accepts_valid_profile(self) -> None:
119119
class MockProfile:
120120
def __init__(self, name: str):
121121
self.name = name
122+
self.dynamic_ip = False
123+
self.reverse_dns = False
124+
self.bgp = None
122125

123126
profile_biz = MockProfile("business")
124127
and_instance = MagicMock()
@@ -178,6 +181,9 @@ async def test_m7_creates_docker_network_per_and(self) -> None:
178181
class MockProfile:
179182
def __init__(self, name: str):
180183
self.name = name
184+
self.dynamic_ip = False
185+
self.reverse_dns = False
186+
self.bgp = None
181187

182188
profile_biz = MockProfile("business")
183189
and_instance = MagicMock()
@@ -234,6 +240,9 @@ async def test_m7_records_and_names_in_output(self) -> None:
234240
class MockProfile:
235241
def __init__(self, name: str):
236242
self.name = name
243+
self.dynamic_ip = False
244+
self.reverse_dns = False
245+
self.bgp = None
237246

238247
profile_biz = MockProfile("business")
239248

@@ -302,6 +311,9 @@ async def test_m7_allocates_cidr_per_and(self) -> None:
302311
class MockProfile:
303312
def __init__(self, name: str):
304313
self.name = name
314+
self.dynamic_ip = False
315+
self.reverse_dns = False
316+
self.bgp = None
305317

306318
profile_biz = MockProfile("business")
307319
and_instance = MagicMock()
@@ -363,6 +375,9 @@ async def test_m7_generates_rules_for_and(self) -> None:
363375
class MockProfile:
364376
def __init__(self, name: str):
365377
self.name = name
378+
self.dynamic_ip = False
379+
self.reverse_dns = False
380+
self.bgp = None
366381

367382
profile_biz = MockProfile("business")
368383
and_instance = MagicMock()
@@ -418,6 +433,9 @@ async def test_m7_applies_rules_to_gateway(self) -> None:
418433
class MockProfile:
419434
def __init__(self, name: str):
420435
self.name = name
436+
self.dynamic_ip = False
437+
self.reverse_dns = False
438+
self.bgp = None
421439

422440
profile_biz = MockProfile("business")
423441
and_instance = MagicMock()
@@ -586,6 +604,9 @@ async def test_m7_emits_ands_ready_event(self) -> None:
586604
class MockProfile:
587605
def __init__(self, name: str):
588606
self.name = name
607+
self.dynamic_ip = False
608+
self.reverse_dns = False
609+
self.bgp = None
589610

590611
profile_biz = MockProfile("business")
591612
and_instance = MagicMock()
@@ -645,6 +666,9 @@ async def test_m7_output_contains_required_fields(self) -> None:
645666
class MockProfile:
646667
def __init__(self, name: str):
647668
self.name = name
669+
self.dynamic_ip = False
670+
self.reverse_dns = False
671+
self.bgp = None
648672

649673
profile_biz = MockProfile("business")
650674
and_instance = MagicMock()
@@ -733,6 +757,9 @@ async def test_m7_processes_org_admitted_event(self) -> None:
733757
class MockProfile:
734758
def __init__(self, name: str):
735759
self.name = name
760+
self.dynamic_ip = False
761+
self.reverse_dns = False
762+
self.bgp = None
736763

737764
profile_biz = MockProfile("business")
738765

0 commit comments

Comments
 (0)