[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:
patchback[bot] 2023-08-08 13:45:14 +02:00 committed by GitHub
parent 32c1e39df1
commit 9ea55a81b3
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 """