-
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
Added get_targets_for_ base class methods #16707
Conversation
@miq-bot assign @gmcculloug @miq-bot add_label providers, bz, blocker, wip |
@syncrou Cannot apply the following label because they are not recognized: bz |
@miq-bot add_label bug |
@miq-bot remove_label wip |
38514ce
to
98d6517
Compare
allow_any_instance_of(User).to receive(:get_timezone).and_return(Time.zone) | ||
allow_any_instance_of(ManageIQ::Providers::CloudManager::ProvisionWorkflow).to receive(:update_field_visibility) | ||
wf = described_class.new({:src_vm_id => template.id}, admin.userid) | ||
wf |
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.
Saw this on the provider version of the spec. Drop the wf
variable and just let described_class.new
return the object.
let(:workflow) do | ||
stub_dialog | ||
allow_any_instance_of(User).to receive(:get_timezone).and_return(Time.zone) | ||
allow_any_instance_of(ManageIQ::Providers::CloudManager::ProvisionWorkflow).to receive(:update_field_visibility) |
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.
Replace ManageIQ::Providers::CloudManager::ProvisionWorkflow
with described_class
.
|
||
let(:admin) { FactoryGirl.create(:user_with_group) } | ||
let(:ems) { FactoryGirl.create(:ems_amazon) } | ||
let(:template) { FactoryGirl.create(:template_amazon, :name => "template", :ext_management_system => ems) } |
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.
Can we use generic factories where possible. Example: template_cloud
.
This we need a little more work before we can replace all of them.
f310da7
to
a4de244
Compare
spec/factories/availability_zone.rb
Outdated
@@ -3,6 +3,8 @@ | |||
sequence(:name) { |n| "availability_zone_#{seq_padded_for_sorting(n)}" } | |||
end | |||
|
|||
factory :availability_zone_generic, :parent => :availability_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.
@syncrou The tests pass locally if I just use availability_zone
in the tests. Is this needed for some reason?
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.
@gmcculloug - I'll do more testing - I was seeing failures without the :parent
value in place.
89b4d4c
to
7374f01
Compare
1. Turns on RBAC filtering by default at the base class level for all allowed_ methods in the CloudManager class https://bugzilla.redhat.com/show_bug.cgi?id=1514237
7374f01
to
449f2ee
Compare
Some comments on commits syncrou/manageiq@14830a7~...449f2ee spec/models/manageiq/providers/cloud_manager/provision_workflow_spec.rb
|
Checked commits syncrou/manageiq@14830a7~...449f2ee with ruby 2.3.3, rubocop 0.47.1, haml-lint 0.20.0, and yamllint 1.10.0 |
Added get_targets_for_ base class methods (cherry picked from commit 7783ec1) https://bugzilla.redhat.com/show_bug.cgi?id=1532646
Gaprindashvili backport details:
|
Added get_targets_for_ base class methods (cherry picked from commit 7783ec1) https://bugzilla.redhat.com/show_bug.cgi?id=1533139
Fine backport details:
|
Added get_targets_for_ base class methods (cherry picked from commit 7783ec1) https://bugzilla.redhat.com/show_bug.cgi?id=1533139
Turns on RBAC filtering by default at the base class level for all
allowed_ methods_
in theManageIQ::CloudManager
class.https://bugzilla.redhat.com/show_bug.cgi?id=1514237
Steps for Testing/QA
There are specific providers that have already overridden the Base Class methods and in some cases the overridden methods do not yet support RBAC filtering. e.g. Amazon and the
allowed_floating_ips
method.