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-02-19 18:09:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-19 18:09:09 +0300
commitc7e385e282bcb8505589bce526e692b7bb819ffa (patch)
tree3e64affe1c2eebdcaa18cc6319b603f44b03b07e /spec/lib/gitlab/ci
parentcd3e2c7b9355f8990ab294b34b5e4add4f3985fa (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/ci')
-rw-r--r--spec/lib/gitlab/ci/yaml_processor_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/yaml_processor_spec.rb b/spec/lib/gitlab/ci/yaml_processor_spec.rb
index e5c5aaa2265..e81aeb620c3 100644
--- a/spec/lib/gitlab/ci/yaml_processor_spec.rb
+++ b/spec/lib/gitlab/ci/yaml_processor_spec.rb
@@ -87,6 +87,28 @@ module Gitlab
end
end
+ describe 'tags entry with default values' do
+ it 'applies default values' do
+ config = YAML.dump({ default: { tags: %w[A B] },
+ rspec: { script: "rspec" } })
+
+ config_processor = Gitlab::Ci::YamlProcessor.new(config)
+
+ expect(config_processor.stage_builds_attributes("test").size).to eq(1)
+ expect(config_processor.stage_builds_attributes("test").first).to eq({
+ stage: "test",
+ stage_idx: 2,
+ name: "rspec",
+ only: { refs: %w[branches tags] },
+ options: { script: ["rspec"] },
+ tag_list: %w[A B],
+ allow_failure: false,
+ when: "on_success",
+ yaml_variables: []
+ })
+ end
+ end
+
describe 'interruptible entry' do
describe 'interruptible job' do
let(:config) do