Project

General

Profile

« Previous | Next » 

Revision 52258efc

Added by Daniel Lobato Garcia over 6 years ago

Fixes #22430 - Plugin permissions are cleared on tests

- Some tests are removing all plugins (plugin_test, rabl_test,
belongs_to_proxy_test) from the registry. This has, among others,
one important consequence: the plugin permissions are removed.

- Take an example. Foreman Ansible overrides the Host#form with a
list of 'Ansible Roles' to choose.

- When the view for this Host#form is rendered (e.g: a
HostController or HostJSTest), the list of 'Ansible Roles' has
also to be rendered.

- Since a previous test removed the plugin from the
`Foreman::Plugin.all` registry, but the plugin is still installed
as a Rails Engine, the overrides by deface still apply.

- Some tests that render the Host form fail to run as rendering is
impossible without the 'ansible_roles' permission. These
permissions are only loaded in tests if the plugin is registered
in Foreman::Plugin*

  • added
  • modified
  • copied
  • renamed
  • deleted