Skip to content

Commit

Permalink
Set up Java logging with level TRACE in testsuite
Browse files Browse the repository at this point in the history
  • Loading branch information
agraul committed Mar 29, 2021
1 parent 66da188 commit 5fef294
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions testsuite/features/core/first_settings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ Feature: Very first settings
Scenario: Wait for refresh of list of products to finish
When I wait until mgr-sync refresh is finished

Scenario: Set up Java logging with level TRACE
When I increase Java log level to "trace" on "server"
And I restart the tomcat service

@server_http_proxy
Scenario: Setup HTTP proxy
Given I am authorized for the "Admin" section
Expand Down
13 changes: 13 additions & 0 deletions testsuite/features/step_definitions/command_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,19 @@
end
end

When(/^I increase Java log level to "([^"]*)" on server$/) do |log_level|
$server.run(
"echo -e >>/srv/tomcat/webapps/rhn/WEB-INF/classes/log4j.properties << CONFIG
log4j.logger.com.suse.manager.reactor=#{log_level.upcase}
log4j.logger.com.suse.manager.webui.services.impl=#{log_level.upcase}
CONFIG"
)
end

And(/^I restart the tomcat service$/) do
$server.run('systemctl restart tomcat.service')
end

When(/^I restart the spacewalk service$/) do
$server.run('spacewalk-service restart')
end
Expand Down

0 comments on commit 5fef294

Please sign in to comment.