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
Test should not read global configuration file #8187
Comments
Tests should only use global.ini.php for most values, see https://github.com/piwik/piwik/blob/master/tests/PHPUnit/Framework/Mock/TestConfig.php#L46 in master. Please be more specific and provide a failing test if possible. |
@diosmosis you have two new plugins that have own archivers PluginA and PluginB and while executing tests for PluginA (e.g. API tests), there might be an error thrown by archiver of PluginB it really makes no sense to execute this logic or to make sure that all additional plugins are disabled before running tests |
That is not enough information. It is expected that PluginB would throw an exception failing a test in PluginA, if PluginB is specified in global.ini.php. If it is not, then you will need to provide a failing test, as this is not something I can reproduce. |
@diosmosis both plugins are enabled only in config.ini.php, not in global. |
That information does not help me diagnose what is happening in your situation. |
@diosmosis When I finish those plugins I will create pull request which will explain this situation. |
When creating a bug report, the minimum is to provide an error message or steps to reproduce the issue. Otherwise it does not help us but it takes us time to try to help and then realise we can't help. Ideally we always need a way to reproduce an issue before we can decide how to best address the challenge we face. |
@Preclowski can you send more information how to reproduce this issue, as so far we could not reproduce it? by design the tests "should" use global config file, and not use config.ini.php so that local configuration does not affect the result of tests. please let us know if it is not working as expected |
Reopen issue if there is any problem, with steps to reproduce (or example test file etc.) |
Reading config from global configuration file, config.ini.php, occurs in many problems with development. In my opinion separating those configurations may improve development speed and quality and would make tests more reliable.
The text was updated successfully, but these errors were encountered: