remove the license check
This commit is contained in:
parent
d59210de58
commit
508938873c
|
@ -21,19 +21,6 @@ describe LfsObject do
|
|||
end
|
||||
end
|
||||
|
||||
describe '#destroy' do
|
||||
subject { create(:lfs_object, :with_file) }
|
||||
|
||||
context 'when running in a Geo primary node' do
|
||||
set(:primary) { create(:geo_node, :primary) }
|
||||
set(:secondary) { create(:geo_node) }
|
||||
|
||||
it 'logs an event to the Geo event log' do
|
||||
expect { subject.destroy }.to change(Geo::LfsObjectDeletedEvent, :count).by(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe '#schedule_background_upload' do
|
||||
before do
|
||||
stub_lfs_setting(enabled: true)
|
||||
|
@ -80,18 +67,6 @@ describe LfsObject do
|
|||
lfs_object.save!
|
||||
end
|
||||
end
|
||||
|
||||
context 'when is unlicensed' do
|
||||
before do
|
||||
stub_lfs_object_storage(background_upload: true, licensed: false)
|
||||
end
|
||||
|
||||
it 'does not schedule the migration' do
|
||||
expect(ObjectStorage::BackgroundMoveWorker).not_to receive(:perform_async)
|
||||
|
||||
subject
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when background upload is disabled' do
|
||||
|
|
|
@ -258,16 +258,6 @@ describe ObjectStorage do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when storage is unlicensed' do
|
||||
before do
|
||||
stub_artifacts_object_storage(licensed: false)
|
||||
end
|
||||
|
||||
it "raises an error" do
|
||||
expect { subject }.to raise_error(/Object Storage feature is missing/)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when credentials are set' do
|
||||
before do
|
||||
stub_artifacts_object_storage
|
||||
|
@ -333,45 +323,4 @@ describe ObjectStorage do
|
|||
|
||||
it { is_expected.to eq(false) }
|
||||
end
|
||||
|
||||
describe '#verify_license!' do
|
||||
subject { uploader.verify_license!(nil) }
|
||||
|
||||
context 'when using local storage' do
|
||||
before do
|
||||
expect(object).to receive(:file_store) { described_class::Store::LOCAL }
|
||||
end
|
||||
|
||||
it "does not raise an error" do
|
||||
expect { subject }.not_to raise_error
|
||||
end
|
||||
end
|
||||
|
||||
context 'when using remote storage' do
|
||||
before do
|
||||
uploader_class.storage_options double(object_store: double(enabled: true))
|
||||
expect(object).to receive(:file_store) { described_class::Store::REMOTE }
|
||||
end
|
||||
|
||||
context 'feature is not available' do
|
||||
before do
|
||||
expect(License).to receive(:feature_available?).with(:object_storage).and_return(false)
|
||||
end
|
||||
|
||||
it "does raise an error" do
|
||||
expect { subject }.to raise_error(/Object Storage feature is missing/)
|
||||
end
|
||||
end
|
||||
|
||||
context 'feature is available' do
|
||||
before do
|
||||
expect(License).to receive(:feature_available?).with(:object_storage).and_return(true)
|
||||
end
|
||||
|
||||
it "does not raise an error" do
|
||||
expect { subject }.not_to raise_error
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue