mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-09-30 05:23:21 -07:00
* Fix linting errors.
* Fix bugs.
* Another linter error ignored.
* More fixes.
* Ignore sanity errors with older versions.
ci_complete
* Forgot to commit more changes.
(cherry picked from commit a54af8909c
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
5a93168d88
commit
2587a2588d
52 changed files with 115 additions and 94 deletions
|
@ -62,7 +62,7 @@ if HAS_TLS and ssl_ctx is not None:
|
|||
smtp_server2 = smtpd_tls.DebuggingServer(('127.0.0.1', port2), None, ssl_ctx=ssl_ctx, starttls=False)
|
||||
else:
|
||||
print('Start SMTP server on port', port1)
|
||||
smtp_server1 = smtpd.DebuggingServer(('127.0.0.1', port1), None)
|
||||
smtp_server1 = smtpd.DebuggingServer(('127.0.0.1', port1), None) # pylint: disable=used-before-assignment
|
||||
if port2:
|
||||
print('WARNING: TLS is NOT supported on this system, not listening on port %s.' % port2)
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-
|
|||
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type
|
||||
plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter
|
||||
plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice
|
||||
plugins/modules/files/ini_file.py pylint:bad-option-value
|
||||
plugins/modules/packaging/language/yarn.py use-argspec-type-path
|
||||
plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error
|
||||
plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice
|
||||
|
|
|
@ -17,6 +17,7 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-
|
|||
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type
|
||||
plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter
|
||||
plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice
|
||||
plugins/modules/files/ini_file.py pylint:bad-option-value
|
||||
plugins/modules/packaging/language/yarn.py use-argspec-type-path
|
||||
plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error
|
||||
plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice
|
||||
|
|
|
@ -17,6 +17,7 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-
|
|||
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type
|
||||
plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter
|
||||
plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice
|
||||
plugins/modules/files/ini_file.py pylint:bad-option-value
|
||||
plugins/modules/packaging/language/yarn.py use-argspec-type-path
|
||||
plugins/modules/packaging/os/redhat_subscription.py validate-modules:return-syntax-error
|
||||
plugins/modules/remote_management/manageiq/manageiq_policies.py validate-modules:parameter-state-invalid-choice
|
||||
|
|
|
@ -75,8 +75,8 @@ class TestMyModule():
|
|||
}
|
||||
mod_obj.params = args
|
||||
lxca_cmms.main()
|
||||
assert(mock.call(argument_spec=expected_arguments_spec,
|
||||
supports_check_mode=False) == ansible_mod_cls.call_args)
|
||||
assert mock.call(argument_spec=expected_arguments_spec,
|
||||
supports_check_mode=False) == ansible_mod_cls.call_args
|
||||
|
||||
@mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True)
|
||||
@mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_cmms._cmms_by_uuid',
|
||||
|
|
|
@ -79,8 +79,8 @@ class TestMyModule():
|
|||
}
|
||||
mod_obj.params = args
|
||||
lxca_nodes.main()
|
||||
assert(mock.call(argument_spec=expected_arguments_spec,
|
||||
supports_check_mode=False) == ansible_mod_cls.call_args)
|
||||
assert mock.call(argument_spec=expected_arguments_spec,
|
||||
supports_check_mode=False) == ansible_mod_cls.call_args
|
||||
|
||||
@mock.patch('ansible_collections.community.general.plugins.module_utils.remote_management.lxca.common.setup_conn', autospec=True)
|
||||
@mock.patch('ansible_collections.community.general.plugins.modules.remote_management.lxca.lxca_nodes._nodes_by_uuid',
|
||||
|
|
|
@ -315,9 +315,9 @@ class TestPmem(ModuleTestCase):
|
|||
test_result = result.exception.args[0]['result']
|
||||
expected = json.loads(namespace)
|
||||
|
||||
for i, notuse in enumerate(test_result):
|
||||
self.assertEqual(test_result[i]['dev'], expected[i]['dev'])
|
||||
self.assertEqual(test_result[i]['size'], expected[i]['size'])
|
||||
for i, result in enumerate(test_result):
|
||||
self.assertEqual(result['dev'], expected[i]['dev'])
|
||||
self.assertEqual(result['size'], expected[i]['size'])
|
||||
|
||||
def test_fail_when_required_args_missing(self):
|
||||
with self.assertRaises(AnsibleFailJson):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue