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

Fixes #35853 - compute_resources_vms_controller_test #9551

Closed

Conversation

stejskalleos
Copy link
Contributor

Issues:

  1. @vm.volumes with array of nils instead of volumes
ComputeResourcesVmsControllerTest#test_0001_should show vm:
ActionView::Template::Error: undefined method `allocation' for nil:NilClass
  1. Missing flags => 0 in default options for destroy method, see fog-libvirt PR [0]
ComputeResourcesVmsControllerTest#test_0001_should destroy vm:
NoMethodError: undefined method `zero?' for nil:NilClass

[0] https://github.com/fog/fog-libvirt/pull/102/files

How to test:

bundle exec rails test test/controllers/compute_resources_vms_controller_test.rb

Issues:
1) @vm.volumes with array of nils instead of volumes
ComputeResourcesVmsControllerTest#test_0001_should show vm:
ActionView::Template::Error: undefined method `allocation' for nil:NilClass

2) Missing flags => 0 in default options for destroy method, see fog-libvirt PR [0]
ComputeResourcesVmsControllerTest#test_0001_should destroy vm:
NoMethodError: undefined method `zero?' for nil:NilClass

[0] https://github.com/fog/fog-libvirt/pull/102/files
@theforeman-bot
Copy link
Member

Issues: #35853

@@ -54,7 +54,7 @@ def find_vm_by_uuid(uuid)

# we default to destroy the VM's storage as well.
def destroy_vm(uuid, args = { })
find_vm_by_uuid(uuid).destroy({ :destroy_volumes => true }.merge(args))
find_vm_by_uuid(uuid).destroy({ destroy_volumes: true, flags: 0 }.merge(args))
Copy link
Member

Choose a reason for hiding this comment

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

I released a compatible 0.11.0 today so this shouldn't be needed anymore.

Copy link
Member

Choose a reason for hiding this comment

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

And I should have linked fog/fog-libvirt#125 as well.

@@ -40,7 +40,7 @@
<td><%= "#{nic.bridge} - #{nic.mac} (#{nic.model})" %></td>
</tr>
<% end %>
<% @vm.volumes.each do |vol| %>
<% @vm.volumes.compact.each do |vol| %>
Copy link
Member

Choose a reason for hiding this comment

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

I wonder why it's returning nil in that list. Feels like an upstream regression as well. Could you have a look if we can solve it in fog-libvirt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yop, I'll take a look ...

@stejskalleos
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants