* [stable-2.8] fixes issue with recieve parameter idempotency (#59999)
fixes assert statements in unit tests
(cherry picked from commit c9a9621a02
)
Co-authored-by: Wojciech Wypior <w.wypior@f5.com>
* Add changelog
This commit is contained in:
parent
e352e7223e
commit
0bc1285987
7 changed files with 16 additions and 6 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- bigip_monitor_http - fix issue with receive parameter idempotency (https://github.com/ansible/ansible/pull/59999)
|
|
@ -481,6 +481,10 @@ class Difference(object):
|
|||
def description(self):
|
||||
return cmp_str_with_none(self.want.description, self.have.description)
|
||||
|
||||
@property
|
||||
def receive(self):
|
||||
return cmp_str_with_none(self.want.receive, self.have.receive)
|
||||
|
||||
@property
|
||||
def receive_disable(self):
|
||||
return cmp_str_with_none(self.want.receive_disable, self.have.receive_disable)
|
||||
|
|
|
@ -485,6 +485,10 @@ class Difference(object):
|
|||
def description(self):
|
||||
return cmp_str_with_none(self.want.description, self.have.description)
|
||||
|
||||
@property
|
||||
def receive(self):
|
||||
return cmp_str_with_none(self.want.receive, self.have.receive)
|
||||
|
||||
@property
|
||||
def receive_disable(self):
|
||||
return cmp_str_with_none(self.want.receive_disable, self.have.receive_disable)
|
||||
|
|
|
@ -292,7 +292,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert 'must be between' in str(ex)
|
||||
assert 'must be between' in str(ex.value)
|
||||
|
||||
def test_set_multicast_address(self, *args):
|
||||
set_module_args(dict(
|
||||
|
|
|
@ -120,7 +120,7 @@ class TestParameters(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as excinfo:
|
||||
p = ModuleParameters(params=args)
|
||||
assert p.name == 'foo'
|
||||
assert 'The provided name must be a valid FQDN' in str(excinfo)
|
||||
assert 'The provided name must be a valid FQDN' in str(excinfo.value)
|
||||
|
||||
|
||||
class TestUntypedManager(unittest.TestCase):
|
||||
|
|
|
@ -305,7 +305,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert "must be less than" in str(ex)
|
||||
assert "must be less than" in str(ex.value)
|
||||
|
||||
def test_update_interval_larger_than_new_timeout(self, *args):
|
||||
set_module_args(dict(
|
||||
|
@ -335,7 +335,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert "must be less than" in str(ex)
|
||||
assert "must be less than" in str(ex.value)
|
||||
|
||||
def test_update_send(self, *args):
|
||||
set_module_args(dict(
|
||||
|
|
|
@ -305,7 +305,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert "must be less than" in str(ex)
|
||||
assert "must be less than" in str(ex.value)
|
||||
|
||||
def test_update_interval_larger_than_new_timeout(self, *args):
|
||||
set_module_args(dict(
|
||||
|
@ -335,7 +335,7 @@ class TestManager(unittest.TestCase):
|
|||
with pytest.raises(F5ModuleError) as ex:
|
||||
mm.exec_module()
|
||||
|
||||
assert "must be less than" in str(ex)
|
||||
assert "must be less than" in str(ex.value)
|
||||
|
||||
def test_update_send(self, *args):
|
||||
set_module_args(dict(
|
||||
|
|
Loading…
Reference in a new issue