mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
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
This commit is contained in:
parent
d08924d759
commit
c1f2f126cf
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