diff options
Diffstat (limited to 'spec/services/packages/pypi/create_package_service_spec.rb')
-rw-r--r-- | spec/services/packages/pypi/create_package_service_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/packages/pypi/create_package_service_spec.rb b/spec/services/packages/pypi/create_package_service_spec.rb index 354ac92b99a..6794ab4d9d6 100644 --- a/spec/services/packages/pypi/create_package_service_spec.rb +++ b/spec/services/packages/pypi/create_package_service_spec.rb @@ -42,6 +42,21 @@ RSpec.describe Packages::Pypi::CreatePackageService, :aggregate_failures do end end + context 'with FIPS mode', :fips_mode do + it 'does not generate file_md5' do + expect { subject }.to change { Packages::Package.pypi.count }.by(1) + + expect(created_package.name).to eq 'foo' + expect(created_package.version).to eq '1.0' + + expect(created_package.pypi_metadatum.required_python).to eq '>=2.7' + expect(created_package.package_files.size).to eq 1 + expect(created_package.package_files.first.file_name).to eq 'foo.tgz' + expect(created_package.package_files.first.file_sha256).to eq sha256 + expect(created_package.package_files.first.file_md5).to be_nil + end + end + context 'without required_python' do before do params.delete(:requires_python) |