Skip to content

Commit

Permalink
check logs with journal instead of syslog
Browse files Browse the repository at this point in the history
  • Loading branch information
rmynar committed Oct 25, 2023
1 parent 3183ab4 commit 2b6eb3e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/foreman/installer/test_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,11 +1307,9 @@ def common_sat_install_assertions(satellite):
sat_version = 'stream' if satellite.is_stream else satellite.version
assert settings.server.version.release == sat_version

# no errors/failures in /var/log/messages
# ignore warnings (some messages contain string "error" but they're still only warnings)
# ignore "kernel: GPT: Use GNU Parted to correct GPT errors."
# no errors/failures in journald
result = satellite.execute(
r'grep -i "error" /var/log/messages | grep -v "\] WARNING" | grep -v GPT'
r'journalctl -q --no-pager -b -p err -u "pulpcore" -u "foreman" -u "foreman-proxy" -u "httpd" -u "postgresql" -u "pulpcore-api" -u "pulpcore-worker"'
)
assert len(result.stdout) == 0
# no errors/failures in /var/log/foreman/production.log
Expand Down Expand Up @@ -1416,11 +1414,9 @@ def test_capsule_installation(sat_default_install, cap_ready_rhel, default_org):
query={'search': f'name={cap_ready_rhel.hostname}'}
)[0]

# no errors/failures in /var/log/messages
# ignore warnings (some messages contain string "error" but they're still only warnings)
# ignore "kernel: GPT: Use GNU Parted to correct GPT errors."
# no errors/failures in journald
result = cap_ready_rhel.execute(
r'grep -i "error" /var/log/messages | grep -v "\] WARNING" | grep -v GPT'
r'journalctl -q --no-pager -b -p err -u "pulpcore" -u "foreman" -u "foreman-proxy" -u "httpd" -u "postgresql" -u "pulpcore-api" -u "pulpcore-worker"'
)
assert len(result.stdout) == 0
# no errors/failures /var/log/foreman-installer/satellite.log
Expand Down

0 comments on commit 2b6eb3e

Please sign in to comment.