Defect #16258
closedTesting redmine with plugins. Redmine::Plugin.clear looks suspicious.
0%
Description
We add several plugins to redmine code base and start running tests. Since some plugins intentionally break vanilla redmine logic a couple of tests fails. It looks confusing.
To avoid that failures we patched redmine to skip tests if specific plugins are loaded. Unfortunately it does not work for functional tests, because of this piece of code: test/functional/admin_controller_test.rb:105
def test_no_plugins Redmine::Plugin.clear get :plugins assert_response :success assert_template 'plugins' end
The method Redmine::Plugin.clear looks suspicious: it clears hash of installing plugins without really unloading them. Plugin is loaded but every other class believes it does not.
It is a defect or behaviour by design?
Updated by Jean-Philippe Lang over 10 years ago
- Assignee set to Jean-Philippe Lang
This is the expected behaviour, this method is for testing purpose and does not unload plugins indeed.
See the source comments: source:/tags/2.5.0/lib/redmine/plugin.rb#L110
The call to the method in this test is removed in r12987, let me know if it solves your issue.
Updated by Jean-Philippe Lang over 10 years ago
- Status changed from New to Needs feedback
Other calls to Redmine::Plugin.clear
are removed from tests in r12988.
Updated by Kirill Smirnov over 10 years ago
The patches 12987 and 12988 really solve our issue, thank you!
Updated by Go MAEDA over 3 years ago
- Status changed from Needs feedback to Closed
- Resolution set to Fixed
Kirill Smirnov wrote:
The patches 12987 and 12988 really solve our issue, thank you!
Closing this issue.