Closed Manisha15 closed 4 years ago
The test is related to core foreman features. I don't know if it could/should be applied to plugins. I need more help and more documentation to know what to do.
You added two actions in controller, namely ostemplates and isos, they should be mapped to foreman-permissions. See doc: https://github.com/theforeman/foreman/blob/develop/developer_docs/how_to_create_a_plugin.asciidoc#adding-permission
Something like this in engine:
security_block :foreman_fog_proxmox do
permission :view_compute_resource, {:'foreman_fog_proxmox/compute_resources' =>
[:ostemplates, :isos] }
end
Thank you so much @Manisha15. I can work on it.
I am trying to mock proxmox compute_resource for foreman_snapshot_management with Fog. The compute resource is of type ForemanFogProxmox::Proxmox. Test in travis-ci for my plugin are running fine but travis also runs
rake test TEST="test/unit/foreman/access_permissions_test.rb"
which fails for foreman_fog_proxmox with error
These tests always fail.
Running environment travis-ci
Language: Ruby
To reproduce the error in foreman: rake test TEST="test/unit/foreman/access_permissions_test.rb"