Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa/spec
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2018-10-26 01:21:32 +0300
committerRobert Speicher <robert@gitlab.com>2018-10-26 01:21:32 +0300
commit08d946e209c246ea9c8a8996c9629ad166e68c8b (patch)
tree6eb8fd9c283bf62c96c1e5aa8f0bd6c1c264c776 /qa/spec
parentbcbaccb9408b899369b0f779f23f4e80de70368a (diff)
parenta85c8e346f0844b0bc8079e03f942f4c53776efa (diff)
Merge branch 'ml-qa-repo-logging' into 'master'
Re-enable debug logging of Git commands and output See merge request gitlab-org/gitlab-ce!22608
Diffstat (limited to 'qa/spec')
-rw-r--r--qa/spec/page/logging_spec.rb6
-rw-r--r--qa/spec/runtime/logger_spec.rb6
2 files changed, 12 insertions, 0 deletions
diff --git a/qa/spec/page/logging_spec.rb b/qa/spec/page/logging_spec.rb
index 9f17de4edbf..9d56353062b 100644
--- a/qa/spec/page/logging_spec.rb
+++ b/qa/spec/page/logging_spec.rb
@@ -3,9 +3,15 @@
require 'capybara/dsl'
describe QA::Support::Page::Logging do
+ include Support::StubENV
+
let(:page) { double().as_null_object }
before do
+ logger = Logger.new $stdout
+ logger.level = ::Logger::DEBUG
+ QA::Runtime::Logger.logger = logger
+
allow(Capybara).to receive(:current_session).and_return(page)
allow(page).to receive(:current_url).and_return('http://current-url')
allow(page).to receive(:has_css?).with(any_args).and_return(true)
diff --git a/qa/spec/runtime/logger_spec.rb b/qa/spec/runtime/logger_spec.rb
index 794e1f9bfe6..44be3381bff 100644
--- a/qa/spec/runtime/logger_spec.rb
+++ b/qa/spec/runtime/logger_spec.rb
@@ -1,6 +1,12 @@
# frozen_string_literal: true
describe QA::Runtime::Logger do
+ before do
+ logger = Logger.new $stdout
+ logger.level = ::Logger::DEBUG
+ described_class.logger = logger
+ end
+
it 'logs debug' do
expect { described_class.debug('test') }.to output(/DEBUG -- : test/).to_stdout_from_any_process
end