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

automatically configure database_tests config for developers when running tests. #7253

Merged
merged 2 commits into from Feb 23, 2015

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Feb 19, 2015

fixes #6635

I also replaced the check that does a request against Piwik to check
whether it is installed with SettingsPiwik::isInstalled() as discussed
recently

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. labels Feb 19, 2015
@tsteur tsteur added this to the Piwik 2.11.1 milestone Feb 19, 2015
$dbTests = $config->database_tests;

if ($dbTests['username'] === '@USERNAME@') {
$dbTests['username'] = 'root';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not set it to Config::getInstance()->database['username']? Maybe I missed some discussion on this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, I just wanted to have it as before. Before, in global config was the default username root which I changed to @USERNAME@. By setting it back to root for developers who update I make sure it is the same as before. In theory, developers could use a different username for there regular database in $dbTests['username']. I used to have this in the piwik-dev-environment where I had one user piwik for the normal database that Piwik uses and one user root for tests.

@mattab
Copy link
Member

mattab commented Feb 23, 2015

FYI: this pr needs a rebase

…ers when running tests.

I also replaced the check that does a request against Piwik to check
whether it is installed with `SettingsPiwik::isInstalled()` as discussed
recently
@tsteur
Copy link
Member Author

tsteur commented Feb 23, 2015

done

mattab pushed a commit that referenced this pull request Feb 23, 2015
automatically configure database_tests config for developers when running tests.
@mattab mattab merged commit e2a1aa1 into master Feb 23, 2015
@diosmosis diosmosis deleted the 6635_2 branch February 23, 2015 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants