Commit a0c89faf authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'qa-review-knapsack-ee' into 'master'

[EE] Run review-qa-all in parallel

See merge request gitlab-org/gitlab-ee!12695
parents afbaf6cb 1a660e96
......@@ -2,6 +2,7 @@
require 'rspec/core'
require 'rspec/expectations'
require 'knapsack'
module QA
module Specs
......
......@@ -192,6 +192,30 @@ describe QA::Runtime::Env do
end
end
describe '.knapsack?' do
it 'returns true if KNAPSACK_GENERATE_REPORT is defined' do
stub_env('KNAPSACK_GENERATE_REPORT', 'true')
expect(described_class.knapsack?).to be_truthy
end
it 'returns true if KNAPSACK_REPORT_PATH is defined' do
stub_env('KNAPSACK_REPORT_PATH', '/a/path')
expect(described_class.knapsack?).to be_truthy
end
it 'returns true if KNAPSACK_TEST_FILE_PATTERN is defined' do
stub_env('KNAPSACK_TEST_FILE_PATTERN', '/a/**/pattern')
expect(described_class.knapsack?).to be_truthy
end
it 'returns false if neither KNAPSACK_GENERATE_REPORT nor KNAPSACK_REPORT_PATH nor KNAPSACK_TEST_FILE_PATTERN are defined' do
expect(described_class.knapsack?).to be_falsey
end
end
describe '.require_github_access_token!' do
it 'raises ArgumentError if GITHUB_ACCESS_TOKEN is not defined' do
stub_env('GITHUB_ACCESS_TOKEN', nil)
......
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