summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/ci/config/entry
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ci/config/entry')
-rw-r--r--spec/lib/gitlab/ci/config/entry/cache_spec.rb14
-rw-r--r--spec/lib/gitlab/ci/config/entry/job_spec.rb186
-rw-r--r--spec/lib/gitlab/ci/config/entry/processable_spec.rb143
-rw-r--r--spec/lib/gitlab/ci/config/entry/product/matrix_spec.rb4
-rw-r--r--spec/lib/gitlab/ci/config/entry/product/parallel_spec.rb6
-rw-r--r--spec/lib/gitlab/ci/config/entry/reports/coverage_report_spec.rb12
-rw-r--r--spec/lib/gitlab/ci/config/entry/reports_spec.rb14
-rw-r--r--spec/lib/gitlab/ci/config/entry/root_spec.rb15
-rw-r--r--spec/lib/gitlab/ci/config/entry/variable_spec.rb8
9 files changed, 206 insertions, 196 deletions
diff --git a/spec/lib/gitlab/ci/config/entry/cache_spec.rb b/spec/lib/gitlab/ci/config/entry/cache_spec.rb
index 414cbb169b9..67252eed938 100644
--- a/spec/lib/gitlab/ci/config/entry/cache_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/cache_spec.rb
@@ -16,12 +16,14 @@ RSpec.describe Gitlab::Ci::Config::Entry::Cache do
let(:policy) { nil }
let(:key) { 'some key' }
let(:when_config) { nil }
+ let(:unprotect) { false }
let(:config) do
{
key: key,
untracked: true,
- paths: ['some/path/']
+ paths: ['some/path/'],
+ unprotect: unprotect
}.tap do |config|
config[:policy] = policy if policy
config[:when] = when_config if when_config
@@ -31,7 +33,7 @@ RSpec.describe Gitlab::Ci::Config::Entry::Cache do
describe '#value' do
shared_examples 'hash key value' do
it 'returns hash value' do
- expect(entry.value).to eq(key: key, untracked: true, paths: ['some/path/'], policy: 'pull-push', when: 'on_success')
+ expect(entry.value).to eq(key: key, untracked: true, paths: ['some/path/'], policy: 'pull-push', when: 'on_success', unprotect: false)
end
end
@@ -57,6 +59,14 @@ RSpec.describe Gitlab::Ci::Config::Entry::Cache do
end
end
+ context 'with option `unprotect` specified' do
+ let(:unprotect) { true }
+
+ it 'returns true' do
+ expect(entry.value).to match(a_hash_including(unprotect: true))
+ end
+ end
+
context 'with `policy`' do
where(:policy, :result) do
'pull-push' | 'pull-push'
diff --git a/spec/lib/gitlab/ci/config/entry/job_spec.rb b/spec/lib/gitlab/ci/config/entry/job_spec.rb
index becb46ac2e7..c1b9bd58d98 100644
--- a/spec/lib/gitlab/ci/config/entry/job_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/job_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Config::Entry::Job do
+RSpec.describe Gitlab::Ci::Config::Entry::Job, feature_category: :pipeline_authoring do
let(:entry) { described_class.new(config, name: :rspec) }
it_behaves_like 'with inheritable CI config' do
@@ -337,100 +337,6 @@ RSpec.describe Gitlab::Ci::Config::Entry::Job do
end
end
- context 'when only: is used with rules:' do
- let(:config) { { only: ['merge_requests'], rules: [{ if: '$THIS' }] } }
-
- it 'returns error about mixing only: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
-
- context 'and only: is blank' do
- let(:config) { { only: nil, rules: [{ if: '$THIS' }] } }
-
- it 'returns error about mixing only: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
- end
-
- context 'and rules: is blank' do
- let(:config) { { only: ['merge_requests'], rules: nil } }
-
- it 'returns error about mixing only: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
- end
- end
-
- context 'when except: is used with rules:' do
- let(:config) { { except: { refs: %w[master] }, rules: [{ if: '$THIS' }] } }
-
- it 'returns error about mixing except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
-
- context 'and except: is blank' do
- let(:config) { { except: nil, rules: [{ if: '$THIS' }] } }
-
- it 'returns error about mixing except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
- end
-
- context 'and rules: is blank' do
- let(:config) { { except: { refs: %w[master] }, rules: nil } }
-
- it 'returns error about mixing except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
- end
- end
-
- context 'when only: and except: are both used with rules:' do
- let(:config) do
- {
- only: %w[merge_requests],
- except: { refs: %w[master] },
- rules: [{ if: '$THIS' }]
- }
- end
-
- it 'returns errors about mixing both only: and except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- expect(entry.errors).to include /may not be used with `rules`/
- end
-
- context 'when only: and except: as both blank' do
- let(:config) do
- { only: nil, except: nil, rules: [{ if: '$THIS' }] }
- end
-
- it 'returns errors about mixing both only: and except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- expect(entry.errors).to include /may not be used with `rules`/
- end
- end
-
- context 'when rules: is blank' do
- let(:config) do
- { only: %w[merge_requests], except: { refs: %w[master] }, rules: nil }
- end
-
- it 'returns errors about mixing both only: and except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- expect(entry.errors).to include /may not be used with `rules`/
- end
- end
- end
-
context 'when start_in specified without delayed specification' do
let(:config) { { start_in: '1 day' } }
@@ -603,6 +509,92 @@ RSpec.describe Gitlab::Ci::Config::Entry::Job do
end
end
end
+
+ context 'when only: is used with rules:' do
+ let(:config) { { only: ['merge_requests'], rules: [{ if: '$THIS' }], script: 'echo' } }
+
+ it 'returns error about mixing only: with rules:' do
+ expect(entry).not_to be_valid
+ expect(entry.errors).to include /may not be used with `rules`: only/
+ end
+
+ context 'and only: is blank' do
+ let(:config) { { only: nil, rules: [{ if: '$THIS' }], script: 'echo' } }
+
+ it 'is valid:' do
+ expect(entry).to be_valid
+ end
+ end
+
+ context 'and rules: is blank' do
+ let(:config) { { only: ['merge_requests'], rules: nil, script: 'echo' } }
+
+ it 'is valid' do
+ expect(entry).to be_valid
+ end
+ end
+ end
+
+ context 'when except: is used with rules:' do
+ let(:config) { { except: { refs: %w[master] }, rules: [{ if: '$THIS' }], script: 'echo' } }
+
+ it 'returns error about mixing except: with rules:' do
+ expect(entry).not_to be_valid
+ expect(entry.errors).to include /may not be used with `rules`: except/
+ end
+
+ context 'and except: is blank' do
+ let(:config) { { except: nil, rules: [{ if: '$THIS' }], script: 'echo' } }
+
+ it 'is valid' do
+ expect(entry).to be_valid
+ end
+ end
+
+ context 'and rules: is blank' do
+ let(:config) { { except: { refs: %w[master] }, rules: nil, script: 'echo' } }
+
+ it 'is valid' do
+ expect(entry).to be_valid
+ end
+ end
+ end
+
+ context 'when only: and except: are both used with rules:' do
+ let(:config) do
+ {
+ only: %w[merge_requests],
+ except: { refs: %w[master] },
+ rules: [{ if: '$THIS' }],
+ script: 'echo'
+ }
+ end
+
+ it 'returns errors about mixing both only: and except: with rules:' do
+ expect(entry).not_to be_valid
+ expect(entry.errors).to include /may not be used with `rules`: only, except/
+ end
+
+ context 'when only: and except: as both blank' do
+ let(:config) do
+ { only: nil, except: nil, rules: [{ if: '$THIS' }], script: 'echo' }
+ end
+
+ it 'is valid' do
+ expect(entry).to be_valid
+ end
+ end
+
+ context 'when rules: is blank' do
+ let(:config) do
+ { only: %w[merge_requests], except: { refs: %w[master] }, rules: nil, script: 'echo' }
+ end
+
+ it 'is valid' do
+ expect(entry).to be_valid
+ end
+ end
+ end
end
describe '#relevant?' do
@@ -639,7 +631,7 @@ RSpec.describe Gitlab::Ci::Config::Entry::Job do
it 'overrides default config' do
expect(entry[:image].value).to eq(name: 'some_image')
- expect(entry[:cache].value).to eq([key: 'test', policy: 'pull-push', when: 'on_success'])
+ expect(entry[:cache].value).to eq([key: 'test', policy: 'pull-push', when: 'on_success', unprotect: false])
end
end
@@ -654,7 +646,7 @@ RSpec.describe Gitlab::Ci::Config::Entry::Job do
it 'uses config from default entry' do
expect(entry[:image].value).to eq 'specified'
- expect(entry[:cache].value).to eq([key: 'test', policy: 'pull-push', when: 'on_success'])
+ expect(entry[:cache].value).to eq([key: 'test', policy: 'pull-push', when: 'on_success', unprotect: false])
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/processable_spec.rb b/spec/lib/gitlab/ci/config/entry/processable_spec.rb
index f1578a068b9..b28562ba2ea 100644
--- a/spec/lib/gitlab/ci/config/entry/processable_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/processable_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Config::Entry::Processable do
+RSpec.describe Gitlab::Ci::Config::Entry::Processable, feature_category: :pipeline_authoring do
let(:node_class) do
Class.new(::Gitlab::Config::Entry::Node) do
include Gitlab::Ci::Config::Entry::Processable
@@ -104,111 +104,102 @@ RSpec.describe Gitlab::Ci::Config::Entry::Processable do
end
end
- context 'when only: is used with rules:' do
- let(:config) { { only: ['merge_requests'], rules: [{ if: '$THIS' }] } }
+ context 'when a variable has an invalid data attribute' do
+ let(:config) do
+ {
+ script: 'echo',
+ variables: { 'VAR1' => 'val 1', 'VAR2' => { value: 'val 2', description: 'hello var 2' } }
+ }
+ end
- it 'returns error about mixing only: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
+ it 'reports error about variable' do
+ expect(entry.errors)
+ .to include 'variables:var2 config uses invalid data keys: description'
end
+ end
+ end
- context 'and only: is blank' do
- let(:config) { { only: nil, rules: [{ if: '$THIS' }] } }
+ context 'when only: is used with rules:' do
+ let(:config) { { only: ['merge_requests'], rules: [{ if: '$THIS' }] } }
- it 'returns error about mixing only: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
- end
+ it 'returns error about mixing only: with rules:' do
+ expect(entry).not_to be_valid
+ expect(entry.errors).to include /may not be used with `rules`: only/
+ end
- context 'and rules: is blank' do
- let(:config) { { only: ['merge_requests'], rules: nil } }
+ context 'and only: is blank' do
+ let(:config) { { only: nil, rules: [{ if: '$THIS' }] } }
- it 'returns error about mixing only: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
+ it 'is valid' do
+ expect(entry).to be_valid
end
end
- context 'when except: is used with rules:' do
- let(:config) { { except: { refs: %w[master] }, rules: [{ if: '$THIS' }] } }
+ context 'and rules: is blank' do
+ let(:config) { { only: ['merge_requests'], rules: nil } }
- it 'returns error about mixing except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
+ it 'is valid' do
+ expect(entry).to be_valid
end
+ end
+ end
- context 'and except: is blank' do
- let(:config) { { except: nil, rules: [{ if: '$THIS' }] } }
+ context 'when except: is used with rules:' do
+ let(:config) { { except: { refs: %w[master] }, rules: [{ if: '$THIS' }] } }
- it 'returns error about mixing except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
- end
+ it 'returns error about mixing except: with rules:' do
+ expect(entry).not_to be_valid
+ expect(entry.errors).to include /may not be used with `rules`: except/
+ end
- context 'and rules: is blank' do
- let(:config) { { except: { refs: %w[master] }, rules: nil } }
+ context 'and except: is blank' do
+ let(:config) { { except: nil, rules: [{ if: '$THIS' }] } }
- it 'returns error about mixing except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- end
+ it 'is valid' do
+ expect(entry).to be_valid
end
end
- context 'when only: and except: are both used with rules:' do
- let(:config) do
- {
- only: %w[merge_requests],
- except: { refs: %w[master] },
- rules: [{ if: '$THIS' }]
- }
- end
+ context 'and rules: is blank' do
+ let(:config) { { except: { refs: %w[master] }, rules: nil } }
- it 'returns errors about mixing both only: and except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- expect(entry.errors).to include /may not be used with `rules`/
+ it 'is valid' do
+ expect(entry).to be_valid
end
+ end
+ end
- context 'when only: and except: as both blank' do
- let(:config) do
- { only: nil, except: nil, rules: [{ if: '$THIS' }] }
- end
+ context 'when only: and except: are both used with rules:' do
+ let(:config) do
+ {
+ only: %w[merge_requests],
+ except: { refs: %w[master] },
+ rules: [{ if: '$THIS' }]
+ }
+ end
- it 'returns errors about mixing both only: and except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- expect(entry.errors).to include /may not be used with `rules`/
- end
- end
+ it 'returns errors about mixing both only: and except: with rules:' do
+ expect(entry).not_to be_valid
+ expect(entry.errors).to include /may not be used with `rules`: only, except/
+ end
- context 'when rules: is blank' do
- let(:config) do
- { only: %w[merge_requests], except: { refs: %w[master] }, rules: nil }
- end
+ context 'when only: and except: as both blank' do
+ let(:config) do
+ { only: nil, except: nil, rules: [{ if: '$THIS' }] }
+ end
- it 'returns errors about mixing both only: and except: with rules:' do
- expect(entry).not_to be_valid
- expect(entry.errors).to include /may not be used with `rules`/
- expect(entry.errors).to include /may not be used with `rules`/
- end
+ it 'is valid' do
+ expect(entry).to be_valid
end
end
- context 'when a variable has an invalid data attribute' do
+ context 'when rules: is blank' do
let(:config) do
- {
- script: 'echo',
- variables: { 'VAR1' => 'val 1', 'VAR2' => { value: 'val 2', description: 'hello var 2' } }
- }
+ { only: %w[merge_requests], except: { refs: %w[master] }, rules: nil }
end
- it 'reports error about variable' do
- expect(entry.errors)
- .to include 'variables:var2 config uses invalid data keys: description'
+ it 'is valid' do
+ expect(entry).to be_valid
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/product/matrix_spec.rb b/spec/lib/gitlab/ci/config/entry/product/matrix_spec.rb
index 394d91466bf..cbd3109522c 100644
--- a/spec/lib/gitlab/ci/config/entry/product/matrix_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/product/matrix_spec.rb
@@ -29,7 +29,7 @@ RSpec.describe ::Gitlab::Ci::Config::Entry::Product::Matrix do
[
{
'VAR_1' => (1..10).to_a,
- 'VAR_2' => (11..20).to_a
+ 'VAR_2' => (11..31).to_a
}
]
end
@@ -41,7 +41,7 @@ RSpec.describe ::Gitlab::Ci::Config::Entry::Product::Matrix do
describe '#errors' do
it 'returns error about too many jobs' do
expect(matrix.errors)
- .to include('matrix config generates too many jobs (maximum is 50)')
+ .to include('matrix config generates too many jobs (maximum is 200)')
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/product/parallel_spec.rb b/spec/lib/gitlab/ci/config/entry/product/parallel_spec.rb
index a16f1cf9e43..ec21519a8f6 100644
--- a/spec/lib/gitlab/ci/config/entry/product/parallel_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/product/parallel_spec.rb
@@ -33,10 +33,10 @@ RSpec.describe ::Gitlab::Ci::Config::Entry::Product::Parallel do
it_behaves_like 'invalid config', /must be greater than or equal to 2/
end
- context 'when it is bigger than 50' do
- let(:config) { 51 }
+ context 'when it is bigger than 200' do
+ let(:config) { 201 }
- it_behaves_like 'invalid config', /must be less than or equal to 50/
+ it_behaves_like 'invalid config', /must be less than or equal to 200/
end
context 'when it is not an integer' do
diff --git a/spec/lib/gitlab/ci/config/entry/reports/coverage_report_spec.rb b/spec/lib/gitlab/ci/config/entry/reports/coverage_report_spec.rb
index 0fd9a83a4fa..ccd6f6ab427 100644
--- a/spec/lib/gitlab/ci/config/entry/reports/coverage_report_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/reports/coverage_report_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Config::Entry::Reports::CoverageReport do
+RSpec.describe Gitlab::Ci::Config::Entry::Reports::CoverageReport, feature_category: :pipeline_authoring do
let(:entry) { described_class.new(config) }
describe 'validations' do
@@ -14,6 +14,16 @@ RSpec.describe Gitlab::Ci::Config::Entry::Reports::CoverageReport do
it { expect(entry.value).to eq(config) }
end
+ context 'when it is not a hash' do
+ where(:config) { ['string', true, []] }
+
+ with_them do
+ it { expect(entry).not_to be_valid }
+
+ it { expect(entry.errors).to include /should be a hash/ }
+ end
+ end
+
context 'with unsupported coverage format' do
let(:config) { { coverage_format: 'jacoco', path: 'jacoco.xml' } }
diff --git a/spec/lib/gitlab/ci/config/entry/reports_spec.rb b/spec/lib/gitlab/ci/config/entry/reports_spec.rb
index 45aa859a356..715cb18fb92 100644
--- a/spec/lib/gitlab/ci/config/entry/reports_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/reports_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::Ci::Config::Entry::Reports do
+RSpec.describe Gitlab::Ci::Config::Entry::Reports, feature_category: :pipeline_authoring do
let(:entry) { described_class.new(config) }
describe 'validates ALLOWED_KEYS' do
@@ -90,6 +90,18 @@ RSpec.describe Gitlab::Ci::Config::Entry::Reports do
end
end
end
+
+ context 'when coverage_report is nil' do
+ let(:config) { { coverage_report: nil } }
+
+ it 'is valid' do
+ expect(entry).to be_valid
+ end
+
+ it 'returns artifacts configuration as an empty hash' do
+ expect(entry.value).to eq({})
+ end
+ end
end
context 'when entry value is not correct' do
diff --git a/spec/lib/gitlab/ci/config/entry/root_spec.rb b/spec/lib/gitlab/ci/config/entry/root_spec.rb
index c40589104cd..9722609aef6 100644
--- a/spec/lib/gitlab/ci/config/entry/root_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/root_spec.rb
@@ -127,7 +127,8 @@ RSpec.describe Gitlab::Ci::Config::Entry::Root do
image: { name: 'image:1.0' },
services: [{ name: 'postgres:9.1' }, { name: 'mysql:5.5' }],
stage: 'test',
- cache: [{ key: 'k', untracked: true, paths: ['public/'], policy: 'pull-push', when: 'on_success' }],
+ cache: [{ key: 'k', untracked: true, paths: ['public/'], policy: 'pull-push', when: 'on_success',
+ unprotect: false }],
job_variables: {},
root_variables_inheritance: true,
ignore: false,
@@ -142,7 +143,8 @@ RSpec.describe Gitlab::Ci::Config::Entry::Root do
image: { name: 'image:1.0' },
services: [{ name: 'postgres:9.1' }, { name: 'mysql:5.5' }],
stage: 'test',
- cache: [{ key: 'k', untracked: true, paths: ['public/'], policy: 'pull-push', when: 'on_success' }],
+ cache: [{ key: 'k', untracked: true, paths: ['public/'], policy: 'pull-push', when: 'on_success',
+ unprotect: false }],
job_variables: {},
root_variables_inheritance: true,
ignore: false,
@@ -158,7 +160,8 @@ RSpec.describe Gitlab::Ci::Config::Entry::Root do
release: { name: "Release $CI_TAG_NAME", tag_name: 'v0.06', description: "./release_changelog.txt" },
image: { name: "image:1.0" },
services: [{ name: "postgres:9.1" }, { name: "mysql:5.5" }],
- cache: [{ key: "k", untracked: true, paths: ["public/"], policy: "pull-push", when: 'on_success' }],
+ cache: [{ key: "k", untracked: true, paths: ["public/"], policy: "pull-push", when: 'on_success',
+ unprotect: false }],
only: { refs: %w(branches tags) },
job_variables: { 'VAR' => { value: 'job' } },
root_variables_inheritance: true,
@@ -206,7 +209,7 @@ RSpec.describe Gitlab::Ci::Config::Entry::Root do
image: { name: 'image:1.0' },
services: [{ name: 'postgres:9.1' }, { name: 'mysql:5.5' }],
stage: 'test',
- cache: [{ key: 'k', untracked: true, paths: ['public/'], policy: 'pull-push', when: 'on_success' }],
+ cache: [{ key: 'k', untracked: true, paths: ['public/'], policy: 'pull-push', when: 'on_success', unprotect: false }],
job_variables: {},
root_variables_inheritance: true,
ignore: false,
@@ -219,7 +222,7 @@ RSpec.describe Gitlab::Ci::Config::Entry::Root do
image: { name: 'image:1.0' },
services: [{ name: 'postgres:9.1' }, { name: 'mysql:5.5' }],
stage: 'test',
- cache: [{ key: 'k', untracked: true, paths: ['public/'], policy: 'pull-push', when: 'on_success' }],
+ cache: [{ key: 'k', untracked: true, paths: ['public/'], policy: 'pull-push', when: 'on_success', unprotect: false }],
job_variables: { 'VAR' => { value: 'job' } },
root_variables_inheritance: true,
ignore: false,
@@ -274,7 +277,7 @@ RSpec.describe Gitlab::Ci::Config::Entry::Root do
describe '#cache_value' do
it 'returns correct cache definition' do
- expect(root.cache_value).to eq([key: 'a', policy: 'pull-push', when: 'on_success'])
+ expect(root.cache_value).to eq([key: 'a', policy: 'pull-push', when: 'on_success', unprotect: false])
end
end
end
diff --git a/spec/lib/gitlab/ci/config/entry/variable_spec.rb b/spec/lib/gitlab/ci/config/entry/variable_spec.rb
index 97b06c8b1a5..1067db6d124 100644
--- a/spec/lib/gitlab/ci/config/entry/variable_spec.rb
+++ b/spec/lib/gitlab/ci/config/entry/variable_spec.rb
@@ -257,14 +257,6 @@ RSpec.describe Gitlab::Ci::Config::Entry::Variable do
subject(:value_with_data) { entry.value_with_data }
it { is_expected.to eq(value: 'value', raw: true) }
-
- context 'when the FF ci_raw_variables_in_yaml_config is disabled' do
- before do
- stub_feature_flags(ci_raw_variables_in_yaml_config: false)
- end
-
- it { is_expected.to eq(value: 'value') }
- end
end
context 'when config expand is true' do