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:
Alexei Znamensky 2023-08-08 07:59:32 +12:00 committed by GitHub
parent d08924d759
commit c1f2f126cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 137 additions and 2 deletions

View file

@ -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 """