Netztyp VPN: standortübergreifende Tunnelnetze, Konzept v0.6
- Netz-Typ VPN; Standort optional nur für VPN, kein DHCP-Bereich - Eindeutigkeit von Netzen ohne Standort per bedingter UniqueConstraint - README: Netztyp, Regel, WireGuard-Netz 172.25.25.0/24 in Kapitel 10 - AUFBAUPLAN: Schritt 2 (Gegenstelle, Tunnel, Standort-Rahmen) in Phase 7 - 66 Tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ab8e0d8ffd
commit
ae15a0aba8
5 files changed
+66
-4
No files matched your search
@@ -270,6 +270,22 @@ class NetzTests(Homelab):
|
||||
with self.assertRaises(ValidationError):
|
||||
self.netz(dhcp_von="192.168.178.200", dhcp_bis="192.168.178.100")
|
||||
|
||||
def test_vpn_netz_ohne_standort(self):
|
||||
vpn = self.netz(name="WireGuard", slug="wireguard", cidr="172.25.25.0/24", typ=Netz.Typ.VPN, standort=None)
|
||||
self.assertIsNone(vpn.standort)
|
||||
with self.assertRaises(ValidationError):
|
||||
self.netz(name="Doppelt", slug="doppelt", cidr="172.25.25.0/24", typ=Netz.Typ.VPN, standort=None)
|
||||
|
||||
def test_vpn_netz_nicht_an_standort(self):
|
||||
with self.assertRaises(ValidationError) as f:
|
||||
self.netz(cidr="172.25.25.0/24", typ=Netz.Typ.VPN)
|
||||
self.assertIn("standort", f.exception.message_dict)
|
||||
|
||||
def test_andere_netze_brauchen_standort(self):
|
||||
with self.assertRaises(ValidationError) as f:
|
||||
self.netz(standort=None)
|
||||
self.assertIn("standort", f.exception.message_dict)
|
||||
|
||||
def test_vlan_netz_braucht_vlan_id(self):
|
||||
with self.assertRaises(ValidationError):
|
||||
self.netz(typ=Netz.Typ.VLAN)
|
||||
|
||||
Reference in new issue
Block a user