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:
authorShinya Maeda <shinya@gitlab.com>2019-01-10 12:32:12 +0300
committerShinya Maeda <shinya@gitlab.com>2019-04-04 12:19:43 +0300
commit8e51439e809db6ff5ff86bd79cdf95af62821a1d (patch)
tree103c4a6602397f03c7d548eb298e02775c21db4b /spec/models
parent74ace2a445a44a13bd22c1907b8ec55b1772d403 (diff)
Drop legacy artifacts usage
Legacy artifacts have been correctly migrated to new place - ci_job_artifacts. Now it's time to remove the related code, but before that we should ensure it doesn't break anything by using feature flag.
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/ci/build_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb
index 2c41dfa65cd..697fe3fda06 100644
--- a/spec/models/ci/build_spec.rb
+++ b/spec/models/ci/build_spec.rb
@@ -117,6 +117,16 @@ describe Ci::Build do
it 'returns the job' do
is_expected.to include(job)
end
+
+ context 'when ci_enable_legacy_artifacts feature flag is disabled' do
+ before do
+ stub_feature_flags(ci_enable_legacy_artifacts: false)
+ end
+
+ it 'does not return the job' do
+ is_expected.not_to include(job)
+ end
+ end
end
context 'when job has a job artifact archive' do
@@ -471,6 +481,14 @@ describe Ci::Build do
let(:build) { create(:ci_build, :legacy_artifacts) }
it { is_expected.to be_truthy }
+
+ context 'when ci_enable_legacy_artifacts feature flag is disabled' do
+ before do
+ stub_feature_flags(ci_enable_legacy_artifacts: false)
+ end
+
+ it { is_expected.to be_falsy }
+ end
end
end
end