Commit 84126b07 authored by Cameron Swords's avatar Cameron Swords

Added to description precedence of options

parent 3fa8fa9e
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# Arguments: # Arguments:
# pipeline: only jobs for the specified pipeline will be found # pipeline: only jobs for the specified pipeline will be found
# params: # params:
# all: boolean, include jobs for all secure job types # all: boolean, include jobs for all secure job types. Takes precedence over other options.
# sast: boolean, include jobs for SAST # sast: boolean, include jobs for SAST
# dast: boolean, include jobs for DAST # dast: boolean, include jobs for DAST
# container_scanning: boolean, include jobs for Container Scanning # container_scanning: boolean, include jobs for Container Scanning
......
...@@ -50,6 +50,14 @@ describe Security::JobsFinder do ...@@ -50,6 +50,14 @@ describe Security::JobsFinder do
it { is_expected.to be_empty } it { is_expected.to be_empty }
end end
context 'searching for all types takes precedence over excluding specific types' do
let!(:build) { create(:ci_build, :dast, pipeline: pipeline) }
let(:finder) { described_class.new(pipeline, all: true, dast: false) }
it { is_expected.to eq([build]) }
end
context 'with dast jobs' do context 'with dast jobs' do
let!(:build) { create(:ci_build, :dast, pipeline: pipeline) } let!(:build) { create(:ci_build, :dast, pipeline: pipeline) }
......
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