mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
interfaces_file: Add test for pre-up/post-up with inet/inet6
This commit is contained in:
committed by
Michael Scherer
parent
bd7001cdb6
commit
4352a4e54d
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user