diff options
Diffstat (limited to 'spec/requests/api/maven_packages_spec.rb')
-rw-r--r-- | spec/requests/api/maven_packages_spec.rb | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/spec/requests/api/maven_packages_spec.rb b/spec/requests/api/maven_packages_spec.rb index 60e91973b5d..4e746802500 100644 --- a/spec/requests/api/maven_packages_spec.rb +++ b/spec/requests/api/maven_packages_spec.rb @@ -1020,7 +1020,7 @@ RSpec.describe API::MavenPackages, feature_category: :package_registry do upload_file(params: params.merge(job_token: job.token)) expect(response).to have_gitlab_http_status(:ok) - expect(project.reload.packages.last.original_build_info.pipeline).to eq job.pipeline + expect(project.reload.packages.last.last_build_info.pipeline).to eq job.pipeline end it 'rejects upload without running job token' do @@ -1155,25 +1155,6 @@ RSpec.describe API::MavenPackages, feature_category: :package_registry do expect(response).to have_gitlab_http_status(:no_content) end - - context 'when the stored sha1 is not the same' do - let(:sent_sha1) { File.read(file_upload.path) } - let(:stored_sha1) { 'wrong sha1' } - - it 'logs an error and returns conflict' do - expect(Gitlab::ErrorTracking).to receive(:log_exception).with( - instance_of(ArgumentError), - message: 'maven package file sha1 conflict', - stored_sha1: stored_sha1, - received_sha256: Digest::SHA256.hexdigest(sent_sha1), - sha256_hexdigest_of_stored_sha1: Digest::SHA256.hexdigest(stored_sha1) - ) - - upload - - expect(response).to have_gitlab_http_status(:conflict) - end - end end context 'for md5 file' do |