Commit ddf892b9 authored by Toon Claes's avatar Toon Claes

Put loggers in before_action for easier overriding in EE

Make it easier to override the set of loggers, by putting them in a
separate method.

Also modify spec so it tests for links, instead of checking for
regular text.
parent 24244d03
class Admin::LogsController < Admin::ApplicationController
before_action :loggers
def show
@loggers = [
end
private
def loggers
@loggers ||= [
Gitlab::AppLogger,
Gitlab::GitLogger,
Gitlab::EnvironmentLogger,
......
......@@ -8,8 +8,10 @@ describe 'Admin browses logs' do
it 'shows available log files' do
visit admin_logs_path
expect(page).to have_content 'test.log'
expect(page).to have_content 'githost.log'
expect(page).to have_content 'application.log'
expect(page).to have_link 'application.log'
expect(page).to have_link 'githost.log'
expect(page).to have_link 'test.log'
expect(page).to have_link 'sidekiq.log'
expect(page).to have_link 'repocheck.log'
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment