Skip to content

Commit

Permalink
Fix the format of the command in print_server_logs function (#9438)
Browse files Browse the repository at this point in the history
  • Loading branch information
srbarrios authored Nov 7, 2024
1 parent 35f50b1 commit a24c7d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testsuite/features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -690,13 +690,13 @@ def scc_access_logging_grain?
# have more infos about the errors
def print_server_logs
$stdout.puts '=> /var/log/rhn/rhn_web_ui.log'
out, _code = get_target('server').run('tail -n20 /var/log/rhn/rhn_web_ui.log | awk -v limit="$(date --date=\'5 minutes ago\' \'+%Y-%m-%d %H:%M:%S\')" \' $0 > limit\'')
out, _code = get_target('server').run('tail -n20 /var/log/rhn/rhn_web_ui.log | awk -v limit="$(date --date="5 minutes ago" "+%Y-%m-%d %H:%M:%S")" " $0 > limit"')
out.each_line do |line|
$stdout.puts line.to_s
end
$stdout.puts
$stdout.puts '=> /var/log/rhn/rhn_web_api.log'
out, _code = get_target('server').run('tail -n20 /var/log/rhn/rhn_web_api.log | awk -v limit="$(date --date=\'5 minutes ago\' \'+%Y-%m-%d %H:%M:%S\')" \' $0 > limit\'')
out, _code = get_target('server').run('tail -n20 /var/log/rhn/rhn_web_api.log | awk -v limit="$(date --date="5 minutes ago" "+%Y-%m-%d %H:%M:%S")" " $0 > limit"')
out.each_line do |line|
$stdout.puts line.to_s
end
Expand Down

0 comments on commit a24c7d5

Please sign in to comment.