Skip to content

Commit

Permalink
[pfsense_interface] Test removing empty sub-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
opoplawski committed Jan 8, 2023
1 parent 29ddfbf commit 45e9a19
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@
<ipaddr>172.16.151.210</ipaddr>
<subnet>24</subnet>
</opt3>
<opt4>
<descr>lan_1200</descr>
<if>vmx1.1200</if>
<enable></enable>
<spoofmac></spoofmac>
<ipaddr>172.16.152.210</ipaddr>
<subnet>24</subnet>
</opt4>
<opt5>
<if>vmx4</if>
<descr>vt2</descr>
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/plugins/modules/test_pfsense_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ def test_interface_error_inet6_overlaps2(self):
msg = "IP address 2001::2001/56 is being used by or overlaps with: lan (2001::2001:22/64)"
self.do_module_test(interface, failed=True, msg=msg)

def test_interface_delete_sub(self):
""" test delete sub interface """
interface = dict(descr='lan_1200', interface='vmx1.1200', state='absent')
command = "delete interface 'lan_1200'"
self.do_module_test(interface, delete=True, command=command)

def test_interface_error_not_uniq(self):
""" test creation of a new interface with interface_descr """
interface = dict(descr='VOICE', interface_descr='notuniq')
Expand Down

0 comments on commit 45e9a19

Please sign in to comment.