diff options
author | Shinya Maeda <shinya@gitlab.com> | 2019-01-10 18:32:12 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2019-04-04 16:19:43 +0700 |
commit | 8e51439e809db6ff5ff86bd79cdf95af62821a1d (patch) | |
tree | 103c4a6602397f03c7d548eb298e02775c21db4b /spec | |
parent | 74ace2a445a44a13bd22c1907b8ec55b1772d403 (diff) | |
download | gitlab-ce-8e51439e809db6ff5ff86bd79cdf95af62821a1d.tar.gz |
Drop legacy artifacts usagedrop-usage-of-leagcy-artifacts
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')
-rw-r--r-- | spec/models/ci/build_spec.rb | 18 |
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 |