diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-24 12:11:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-24 12:11:09 +0300 |
commit | 91e247b531c89342faed387c0d312622eb8a9c93 (patch) | |
tree | a9230928f5b0e789771022018893f36becbb01c9 /spec/requests/api | |
parent | ea8c11261522bda899f8b5e5ac61a6324e2904ba (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api')
-rw-r--r-- | spec/requests/api/jobs_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/requests/api/jobs_spec.rb b/spec/requests/api/jobs_spec.rb index 1c43ef25f14..d6783f5e004 100644 --- a/spec/requests/api/jobs_spec.rb +++ b/spec/requests/api/jobs_spec.rb @@ -329,6 +329,17 @@ RSpec.describe API::Jobs do .to include('Content-Type' => 'application/json', 'Gitlab-Workhorse-Send-Data' => /artifacts-entry/) end + + context 'when artifacts are locked' do + it 'allows access to expired artifact' do + pipeline.artifacts_locked! + job.update!(artifacts_expire_at: Time.now - 7.days) + + get_artifact_file(artifact) + + expect(response).to have_gitlab_http_status(:ok) + end + end end end |