mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-31 05:19:09 -07:00
Refactors main() function and module manager in multiple modules in line with recent changes (#53984)
Adds variable types to docs Refactors unit tests to remove deprecated parameters
This commit is contained in:
parent
ab238071e3
commit
9a007799d4
32 changed files with 627 additions and 465 deletions
|
@ -152,10 +152,12 @@ class TestV1Manager(unittest.TestCase):
|
|||
def test_ucs_explicit_present(self, *args):
|
||||
set_module_args(dict(
|
||||
ucs="/root/bigip.localhost.localdomain.ucs",
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
state='present'
|
||||
state='present',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
@ -178,10 +180,12 @@ class TestV1Manager(unittest.TestCase):
|
|||
def test_ucs_installed(self, *args):
|
||||
set_module_args(dict(
|
||||
ucs="/root/bigip.localhost.localdomain.ucs",
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
state='installed'
|
||||
state='installed',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
@ -205,10 +209,12 @@ class TestV1Manager(unittest.TestCase):
|
|||
def test_ucs_absent_exists(self, *args):
|
||||
set_module_args(dict(
|
||||
ucs="/root/bigip.localhost.localdomain.ucs",
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
state='absent'
|
||||
state='absent',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
@ -231,10 +237,12 @@ class TestV1Manager(unittest.TestCase):
|
|||
def test_ucs_absent_fails(self, *args):
|
||||
set_module_args(dict(
|
||||
ucs="/root/bigip.localhost.localdomain.ucs",
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
state='absent'
|
||||
state='absent',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
@ -263,9 +271,11 @@ class TestV2Manager(unittest.TestCase):
|
|||
def test_ucs_default_present(self, *args):
|
||||
set_module_args(dict(
|
||||
ucs="/root/bigip.localhost.localdomain.ucs",
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
@ -288,10 +298,12 @@ class TestV2Manager(unittest.TestCase):
|
|||
def test_ucs_explicit_present(self, *args):
|
||||
set_module_args(dict(
|
||||
ucs="/root/bigip.localhost.localdomain.ucs",
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
state='present'
|
||||
state='present',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
@ -314,10 +326,12 @@ class TestV2Manager(unittest.TestCase):
|
|||
def test_ucs_installed(self, *args):
|
||||
set_module_args(dict(
|
||||
ucs="/root/bigip.localhost.localdomain.ucs",
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
state='installed'
|
||||
state='installed',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
@ -341,10 +355,12 @@ class TestV2Manager(unittest.TestCase):
|
|||
def test_ucs_absent_exists(self, *args):
|
||||
set_module_args(dict(
|
||||
ucs="/root/bigip.localhost.localdomain.ucs",
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
state='absent'
|
||||
state='absent',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
@ -367,10 +383,12 @@ class TestV2Manager(unittest.TestCase):
|
|||
def test_ucs_absent_fails(self, *args):
|
||||
set_module_args(dict(
|
||||
ucs="/root/bigip.localhost.localdomain.ucs",
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin',
|
||||
state='absent'
|
||||
state='absent',
|
||||
provider=dict(
|
||||
server='localhost',
|
||||
password='password',
|
||||
user='admin'
|
||||
)
|
||||
))
|
||||
|
||||
module = AnsibleModule(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue