-
Notifications
You must be signed in to change notification settings - Fork 898
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
Cap&U subclass MetricsCapture #19610
Conversation
Each type of ems captures different targets.
reduce specialized testing methods
this context is only used in one place
these are testing perf_capture_queue
group these using as priority tests use existing miq_server / zone use fewer @ variables
91be010
to
5c3de11
Compare
@@ -0,0 +1,5 @@ | |||
class ManageIQ::Providers::CloudManager::MetricsCapture < ManageIQ::Providers::BaseManager::MetricsCapture | |||
def capture_ems_targets(options = {}) | |||
Metric::Targets.capture_cloud_targets([ems], options) |
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.
@kbrock is the goal to move all of e.g. capture_cloud_targets
into the CloudManager::MetricsCapture
class?
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.
Currently, all MetricsCapture
objects subclass BaseManager::MetricsCapture
. So the base case will need to call into that method.
Are you thinking about moving that method into BaseManager::MetricsCapture
and then removing/moving into the subclass once we are subclassing correctly?
I was thinking that we would introduce the subclassing. Change all providers. Then move/remove capture_cloud_targets
.
spec/models/manageiq/providers/base_manager/metrics_capture_spec.rb
Outdated
Show resolved
Hide resolved
It really isn't bad, mostly moving specs around |
Checked commits kbrock/manageiq@a344f84~...c7a663e with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 spec/models/manageiq/providers/base_manager/metrics_capture_spec.rb
spec/models/manageiq/providers/cloud_manager/metrics_capture_spec.rb
|
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'd love to remove most from target.
Lets introduce the hiererchy and then drop them
@@ -0,0 +1,5 @@ | |||
class ManageIQ::Providers::CloudManager::MetricsCapture < ManageIQ::Providers::BaseManager::MetricsCapture | |||
def capture_ems_targets(options = {}) | |||
Metric::Targets.capture_cloud_targets([ems], options) |
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.
Currently, all MetricsCapture
objects subclass BaseManager::MetricsCapture
. So the base case will need to call into that method.
Are you thinking about moving that method into BaseManager::MetricsCapture
and then removing/moving into the subclass once we are subclassing correctly?
I was thinking that we would introduce the subclassing. Change all providers. Then move/remove capture_cloud_targets
.
This got bigger than I thought it would.
creates subclasses for MetricsCapture (currently around
capture_ems_targets
)put those tests in appropriate place