mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 05:11:25 -07:00
interfaces_file: Add test for pre-up/post-up with inet/inet6
This commit is contained in:
parent
bd7001cdb6
commit
4352a4e54d
56 changed files with 1008 additions and 10 deletions
|
@ -230,7 +230,7 @@ class TestInterfacesFileModule(unittest.TestCase):
|
|||
# Restore backup
|
||||
move(backupp, path)
|
||||
|
||||
def test_change_address(self):
|
||||
def test_inet_inet6(self):
|
||||
testcases = {
|
||||
"change_ipv4": [
|
||||
{
|
||||
|
@ -250,6 +250,42 @@ class TestInterfacesFileModule(unittest.TestCase):
|
|||
'state': 'present',
|
||||
}
|
||||
],
|
||||
"change_ipv4_pre_up": [
|
||||
{
|
||||
'iface': 'eth0',
|
||||
'address_family': 'inet',
|
||||
'option': 'pre-up',
|
||||
'value': 'XXXX_ipv4',
|
||||
'state': 'present',
|
||||
}
|
||||
],
|
||||
"change_ipv6_pre_up": [
|
||||
{
|
||||
'iface': 'eth0',
|
||||
'address_family': 'inet6',
|
||||
'option': 'pre-up',
|
||||
'value': 'XXXX_ipv6',
|
||||
'state': 'present',
|
||||
}
|
||||
],
|
||||
"change_ipv4_post_up": [
|
||||
{
|
||||
'iface': 'eth0',
|
||||
'address_family': 'inet',
|
||||
'option': 'post-up',
|
||||
'value': 'XXXX_ipv4',
|
||||
'state': 'present',
|
||||
}
|
||||
],
|
||||
"change_ipv6_post_up": [
|
||||
{
|
||||
'iface': 'eth0',
|
||||
'address_family': 'inet6',
|
||||
'option': 'post-up',
|
||||
'value': 'XXXX_ipv6',
|
||||
'state': 'present',
|
||||
}
|
||||
],
|
||||
}
|
||||
for testname, options_list in testcases.items():
|
||||
for testfile in self.getTestFiles():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue