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
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions spec/factories/cloud_volume.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
factory :cloud_volume do
end

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

factory :cloud_volume_openstack, :class => "ManageIQ::Providers::Openstack::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

status "available"
end
Expand Down
4 changes: 2 additions & 2 deletions spec/models/cloud_volume_spec.rb
Original file line number Diff line number Diff line change
@@ -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

cv2 = FactoryGirl.create(:cloud_volume)

expect(described_class.available).to eq([cv2])
end
Expand Down