Skip to content

Commit

Permalink
fix(tests): wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bouda1 committed Mar 31, 2023
1 parent e51c3cc commit cbc23fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions tests/resources/Common.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ def find_regex_in_log_with_timeout(log: str, date, content, timeout: int):
if ok:
return True, c
time.sleep(5)
logger.console(
"Unable to find regex '{}' from {} during {}s".format(c, date, timeout))
logger.console(f"Unable to find regex '{c}' from {date} during {timeout}s")
return False, c


Expand All @@ -101,9 +100,8 @@ def find_in_log_with_timeout(log: str, date, content, timeout: int):
if ok:
return True
time.sleep(5)
logger.console(
"Unable to find '{}' from {} during {}s".format(c, date, timeout))
return False, c
logger.console(f"Unable to find '{c}' from {date} during {timeout}s")
return False


def find_in_log(log: str, date, content, regex=False):
Expand Down
2 changes: 1 addition & 1 deletion tests/resources/db_variables.robot
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ ${DBHost} localhost
${DBUser} centreon
${DBPass} centreon
${DBPort} 3306
${DBUserRoot} root_centreon
${DBUserRoot} root
${DBPassRoot} centreon

2 changes: 1 addition & 1 deletion tests/robot.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

sed -i -r 's/(\$\{DBUserRoot\}\s*)root_centreon/\1centreon/g' resources/db_variables.robot
sed -i -r 's/(\$\{DBUserRoot\}\s*)root_centreon/\1root/g' resources/db_variables.robot
ulimit -c unlimited
sysctl -w kernel.core_pattern=/tmp/core-%e.%p.%h.%t

Expand Down

0 comments on commit cbc23fa

Please sign in to comment.