mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-30 21:09:09 -07:00
[PR #7033/c1f2f126 backport][stable-6] ejabberd_user: bug fixes + tests (#7069)
ejabberd_user: bug fixes + tests (#7033)
* ejabberd_user: bug fixes + tests
* fix changed property
* add license to handler file
* adjustments to test
* add needs/target/setup_epel to aliases
* further adjustments to integration tests
* add target to integration tests
* add some skips to test
* skip centos as it has no ejabberd
* skip fedora as it has no ejabberd
* discard unused epel setup
* add changelog frag
* remove ejabberd before tests
* fix typo
(cherry picked from commit c1f2f126cf
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
32c1e39df1
commit
9ea55a81b3
6 changed files with 137 additions and 2 deletions
|
@ -102,7 +102,7 @@ class EjabberdUser(object):
|
|||
changed. It will return True if the user does not match the supplied
|
||||
credentials and False if it does not
|
||||
"""
|
||||
return self.run_command('check_password', [self.user, self.host, self.pwd])
|
||||
return bool(self.run_command('check_password', [self.user, self.host, self.pwd])[0])
|
||||
|
||||
@property
|
||||
def exists(self):
|
||||
|
@ -110,7 +110,7 @@ class EjabberdUser(object):
|
|||
host specified. If the user exists True is returned, otherwise False
|
||||
is returned
|
||||
"""
|
||||
return self.run_command('check_account', [self.user, self.host])
|
||||
return not bool(self.run_command('check_account', [self.user, self.host])[0])
|
||||
|
||||
def log(self, entry):
|
||||
""" This method will log information to the local syslog facility """
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue