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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-15 21:08:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-15 21:08:43 +0300
commit316fbf9f95dcdd16775f0339415572c3195eea92 (patch)
tree40d86a896fc0ff8ce22fbed7e5e3dffc2adceebf /spec/services/ci/pipeline_trigger_service_spec.rb
parentd9e71b0d412fb9d2d7fc8b00dddac21617eaaf19 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/ci/pipeline_trigger_service_spec.rb')
-rw-r--r--spec/services/ci/pipeline_trigger_service_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/services/ci/pipeline_trigger_service_spec.rb b/spec/services/ci/pipeline_trigger_service_spec.rb
index ac077e3c30e..7cd0b8dd2ab 100644
--- a/spec/services/ci/pipeline_trigger_service_spec.rb
+++ b/spec/services/ci/pipeline_trigger_service_spec.rb
@@ -161,6 +161,29 @@ RSpec.describe Ci::PipelineTriggerService do
expect(result[:pipeline].variables.map { |v| { v.key => v.value } }.first).to eq(variables)
expect(job.sourced_pipelines.last.pipeline_id).to eq(result[:pipeline].id)
end
+
+ context 'when the config has workflow rule with the variable' do
+ let(:config) do
+ <<-EOY
+ workflow:
+ rules:
+ - if: $AAA
+
+ regular-job:
+ script: 'echo Hello, World!'
+ EOY
+ end
+
+ before do
+ stub_ci_pipeline_yaml_file(config)
+ end
+
+ it 'runs the pipeline' do
+ expect { result }.to change { Ci::Pipeline.count }.by(1)
+
+ expect(result[:status]).to eq(:success)
+ end
+ end
end
end