-
Notifications
You must be signed in to change notification settings - Fork 900
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add shared examples for EMS#pause! and #resume! #22716
Add shared examples for EMS#pause! and #resume! #22716
Conversation
These tests should be run by every provider to ensure these are fully functional.
@miq-bot cross-repo-tests ManageIQ/manageiq-providers-amazon#827 |
From Pull Request: ManageIQ/manageiq#22716
emses = { | ||
:amazon_cloud => FactoryBot.create(:ems_amazon, :zone => zone), | ||
:azure_cloud => FactoryBot.create(:ems_azure, :zone => zone), | ||
:google_cloud => FactoryBot.create(:ems_google, :zone => zone), | ||
:openstack_cloud => FactoryBot.create(:ems_openstack, :zone => zone), | ||
:openstack_infra => FactoryBot.create(:ems_openstack_infra, :zone => zone), | ||
:vmware_cloud => FactoryBot.create(:ems_vmware_cloud, :zone => zone), | ||
:vpc_cloud => FactoryBot.create(:ems_ibm_cloud_vpc, :zone => zone) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always thought it was wrong that we looped through these providers in core versus having shared_examples that each include. This list doesn't even include all providers, with shared examples we can add a spec test to the provider generator.
Checked commit agrare@fca621e with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint |
ems.pause! | ||
ems.reload | ||
ems.resume! | ||
ems.reload |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little weird but the existing tests do this (https://github.com/ManageIQ/manageiq/pull/22716/files#diff-f50b4b351bf43b590f4afa70fdf2534bb4291339af5d57f9c283b73913a95ab0L623-L627)
It seemed difficult to setup the ems paused with let(:ems)
. Maybe we could add an Rspec trait for :paused
, more investigation needed.
think testing the propagation of network managers may overlap quite a bit with these tests. Not sure how deep you want to go here |
Backported to
|
…ent_system_pause_resume Add shared examples for EMS#pause! and #resume! (cherry picked from commit 9e4b2e3)
These tests should be run by every provider to ensure these are fully functional.
Include the shared_examples in every provider: