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

[2.16.4] dbname value under database_tests section overridden in tests/javascript/piwik.php #11587

Closed
yarimadam opened this issue Apr 4, 2017 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@yarimadam
Copy link

hi there,

i'm trying to perform unit tests for piwik.js trough http://example.tld/tests/javascript/.

however, some part of the tests were failing due to getting 500 error from XHR made to /tests/javascript/piwik.php.

after spending some time i found that the file tests/javascript/piwik.php overrides value of the dbname (database_tests section) to tracker_tests which doesn't exists.

i can confirm that i am able to perform all unit tests after i created tracker_tests database.

any suggestions? is it a potential bug or i'm i missing something?

@mattab
Copy link
Member

mattab commented May 8, 2017

Hi @yarimadam
Thanks for the report. the tracker_tests mysql DB should be automatically created when executing the tests. in some cases it does not work. What would be useful is that when we load the page /tests/javascript/ we could display a warning in case the tracker_tests mysql DB cannot be created for some reason.

@mattab
Copy link
Member

mattab commented May 8, 2017

Feel free to create a PR if you can for this improvement. For now we'll close the issue

@mattab mattab closed this as completed May 8, 2017
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants