Commit 50893887 authored by Micaël Bergeron's avatar Micaël Bergeron

remove the license check

parent d59210de
...@@ -21,19 +21,6 @@ describe LfsObject do ...@@ -21,19 +21,6 @@ describe LfsObject do
end end
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 describe '#schedule_background_upload' do
before do before do
stub_lfs_setting(enabled: true) stub_lfs_setting(enabled: true)
...@@ -80,18 +67,6 @@ describe LfsObject do ...@@ -80,18 +67,6 @@ describe LfsObject do
lfs_object.save! lfs_object.save!
end end
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 end
context 'when background upload is disabled' do context 'when background upload is disabled' do
......
...@@ -258,16 +258,6 @@ describe ObjectStorage do ...@@ -258,16 +258,6 @@ describe ObjectStorage do
end end
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 context 'when credentials are set' do
before do before do
stub_artifacts_object_storage stub_artifacts_object_storage
...@@ -333,45 +323,4 @@ describe ObjectStorage do ...@@ -333,45 +323,4 @@ describe ObjectStorage do
it { is_expected.to eq(false) } it { is_expected.to eq(false) }
end 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 end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment