debian-mirror-gitlab/spec/services/packages/debian/generate_distribution_service_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
842 B
Ruby
Raw Normal View History

2021-06-08 01:23:25 +05:30
# frozen_string_literal: true
2021-09-04 01:27:46 +05:30
2021-06-08 01:23:25 +05:30
require 'spec_helper'
RSpec.describe Packages::Debian::GenerateDistributionService do
describe '#execute' do
2021-09-04 01:27:46 +05:30
subject { described_class.new(distribution).execute }
2021-06-08 01:23:25 +05:30
2021-10-27 15:23:28 +05:30
let(:subject2) { described_class.new(distribution).execute }
let(:subject3) { described_class.new(distribution).execute }
2021-09-04 01:27:46 +05:30
include_context 'with published Debian package'
2021-06-08 01:23:25 +05:30
2021-09-04 01:27:46 +05:30
[:project, :group].each do |container_type|
context "for #{container_type}" do
include_context 'with Debian distribution', container_type
2021-06-08 01:23:25 +05:30
2022-08-13 15:12:31 +05:30
context 'with FIPS mode enabled', :fips_mode do
it 'raises an error' do
expect { subject }.to raise_error(::Packages::FIPS::DisabledError)
end
end
2021-10-27 15:23:28 +05:30
it_behaves_like 'Generate Debian Distribution and component files'
2021-06-08 01:23:25 +05:30
end
end
end
end