Browse Source

tests: disable update tests

pull/1371/head
Misty De Meo 3 months ago
parent
commit
41b5409e07
No known key found for this signature in database
GPG Key ID: 76CF846A2F674B2C
  1. 16
      spec/lib/admin/system_check/software_version_check_spec.rb
  2. 12
      spec/models/software_update_spec.rb
  3. 6
      spec/services/software_update_check_service_spec.rb
  4. 2
      spec/system/admin/dashboard_spec.rb
  5. 2
      spec/system/admin/software_updates_spec.rb

16
spec/lib/admin/system_check/software_version_check_spec.rb

@ -22,6 +22,8 @@ RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do
before { allow(user).to receive(:can?).with(:view_devops).and_return(true) }
it 'returns false' do
skip('version checks currently skipped in Hometown')
expect(check.skip?).to be false
end
@ -53,6 +55,8 @@ RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do
end
it 'returns false' do
skip('version checks currently skipped in Hometown')
expect(check.pass?).to be false
end
end
@ -63,6 +67,8 @@ RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do
end
it 'returns false' do
skip('version checks currently skipped in Hometown')
expect(check.pass?).to be false
end
end
@ -73,6 +79,8 @@ RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do
end
it 'returns false' do
skip('version checks currently skipped in Hometown')
expect(check.pass?).to be false
end
end
@ -83,6 +91,8 @@ RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do
end
it 'returns false' do
skip('version checks currently skipped in Hometown')
expect(check.pass?).to be false
end
end
@ -93,6 +103,8 @@ RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do
end
it 'returns false' do
skip('version checks currently skipped in Hometown')
expect(check.pass?).to be false
end
end
@ -105,6 +117,8 @@ RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do
end
it 'sends class name symbol to message instance' do
skip('version checks currently skipped in Hometown')
allow(Admin::SystemCheck::Message).to receive(:new)
.with(:software_version_patch_check, anything, anything)
@ -121,6 +135,8 @@ RSpec.describe Admin::SystemCheck::SoftwareVersionCheck do
end
it 'sends class name symbol to message instance' do
skip('version checks currently skipped in Hometown')
allow(Admin::SystemCheck::Message).to receive(:new)
.with(:software_version_critical_check, anything, anything, anything)

12
spec/models/software_update_spec.rb

@ -93,6 +93,8 @@ RSpec.describe SoftwareUpdate do
let(:mastodon_version) { '3.4.0' }
it 'returns the expected versions' do
skip('version checks currently skipped in Hometown')
expect(described_class.pending_to_a.pluck(:version)).to contain_exactly('3.4.42', '3.5.0', '4.2.0')
end
end
@ -113,6 +115,8 @@ RSpec.describe SoftwareUpdate do
end
it 'returns the expected versions' do
skip('version checks currently skipped in Hometown')
expect(described_class.pending_to_a.pluck(:version)).to contain_exactly('4.3.0-nightly.2023-09-12')
end
end
@ -121,6 +125,8 @@ RSpec.describe SoftwareUpdate do
let(:mastodon_version) { '4.2.0-nightly.2023-07-10' }
it 'returns the expected versions' do
skip('version checks currently skipped in Hometown')
expect(described_class.pending_to_a.pluck(:version)).to contain_exactly('4.2.0')
end
end
@ -133,6 +139,8 @@ RSpec.describe SoftwareUpdate do
end
it 'returns the expected versions' do
skip('version checks currently skipped in Hometown')
expect(described_class.pending_to_a.pluck(:version)).to contain_exactly('4.3.0-0.dev.2')
end
end
@ -145,6 +153,8 @@ RSpec.describe SoftwareUpdate do
end
it 'returns the expected versions' do
skip('version checks currently skipped in Hometown')
expect(described_class.pending_to_a.pluck(:version)).to contain_exactly('4.3.0-beta2')
end
end
@ -157,6 +167,8 @@ RSpec.describe SoftwareUpdate do
end
it 'returns the expected versions' do
skip('version checks currently skipped in Hometown')
expect(described_class.pending_to_a.pluck(:version)).to contain_exactly('4.3.0-rc1')
end
end

6
spec/services/software_update_check_service_spec.rb

@ -86,11 +86,15 @@ RSpec.describe SoftwareUpdateCheckService do
end
it 'updates the list of known updates' do
skip('version checks currently skipped in Hometown')
expect { subject.call }.to change { SoftwareUpdate.pluck(:version).sort }.from(['3.5.0', '42.13.12', 'Malformed']).to(['4.2.1', '4.3.0', '5.0.0'])
end
context 'when no update is urgent' do
it 'sends e-mail notifications according to settings', :aggregate_failures do
skip('version checks currently skipped in Hometown')
expect { subject.call }.to have_enqueued_mail(AdminMailer, :new_software_updates)
.with(hash_including(params: { recipient: owner_user.account })).once
.and(have_enqueued_mail(AdminMailer, :new_software_updates).with(hash_including(params: { recipient: patch_user.account })).once)
@ -113,6 +117,8 @@ RSpec.describe SoftwareUpdateCheckService do
end
it 'sends e-mail notifications according to settings', :aggregate_failures do
skip('version checks currently skipped in Hometown')
expect { subject.call }.to have_enqueued_mail(AdminMailer, :new_critical_software_updates)
.with(hash_including(params: { recipient: owner_user.account })).once
.and(have_enqueued_mail(AdminMailer, :new_critical_software_updates).with(hash_including(params: { recipient: patch_user.account })).once)

2
spec/system/admin/dashboard_spec.rb

@ -14,6 +14,8 @@ RSpec.describe 'Admin Dashboard' do
end
it 'returns page with system check messages' do
skip('version checks currently skipped in Hometown')
visit admin_dashboard_path
expect(page)

2
spec/system/admin/software_updates_spec.rb

@ -11,6 +11,8 @@ RSpec.describe 'finding software updates through the admin interface' do
end
it 'shows a link to the software updates page, which links to release notes' do
skip('version checks currently skipped in Hometown')
visit settings_profile_path
click_on I18n.t('admin.critical_update_pending')

Loading…
Cancel
Save