Skip to content
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

Fix amazon cloud volume spec failures #13886

Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Feb 13, 2017

Amazon CloudVolumes are now defined in the StorageManager per ManageIQ/manageiq-providers-amazon#136

This fixes the associated spec tests failures

cc @durandom @mkanoor

Copy link
Member

@durandom durandom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

factory part looks great

cc @Ladas

@@ -1,8 +1,8 @@
describe CloudVolume do
it ".available" do
disk = FactoryGirl.create(:disk)
cv1 = FactoryGirl.create(:cloud_volume_amazon, :attachments => [disk])
cv2 = FactoryGirl.create(:cloud_volume_amazon)
cv1 = FactoryGirl.create(:cloud_volume, :attachments => [disk])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for using a base class

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gmcculloug
Can you please review this one

@@ -2,9 +2,6 @@
factory :cloud_volume do
end

factory :cloud_volume_amazon, :class => "ManageIQ::Providers::Amazon::CloudManager::CloudVolume", :parent => :cloud_volume do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice to see this go. Looks like we dont use it in the other repos too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good call, I checked the rest of ManageIQ/manageiq to see if it was used but not the other repos.
You're right though it looks like these are the only cases that use it https://github.com/search?q=org%3AManageIQ+cloud_volume_amazon&type=Code

@mkanoor
Copy link
Contributor

mkanoor commented Feb 13, 2017

@agrare
Can you add a link to where they have moved

@miq-bot
Copy link
Member

miq-bot commented Feb 13, 2017

Checked commits agrare/manageiq@e6740e5~...a98f61f with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
3 files checked, 1 offense detected

spec/models/cloud_volume_spec.rb

@agrare
Copy link
Member Author

agrare commented Feb 13, 2017

@agrare
Copy link
Member Author

agrare commented Feb 13, 2017

@mkanoor do the service model changes make sense?

@agrare
Copy link
Member Author

agrare commented Feb 13, 2017

cc @blomquisg

@gmcculloug
Copy link
Member

Looks good. May have to deal with model namespace change if users are looking up directly from automate but that is unlikely. @blomquisg Let's merge to get back to 💚 .

@gmcculloug gmcculloug merged commit eeb1bd0 into ManageIQ:master Feb 13, 2017
@gmcculloug gmcculloug added this to the Sprint 54 Ending Feb 13, 2017 milestone Feb 13, 2017
@agrare agrare deleted the fix_amazon_cloud_volume_spec_failures branch February 13, 2017 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants