-
Notifications
You must be signed in to change notification settings - Fork 62
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
Read host and port information from solr instance, not Pantheon env variables #411
Read host and port information from solr instance, not Pantheon env variables #411
Conversation
… on get_solr not being called inside get_server_info?
@danielbachhuber I'm having some issues with my tests - they don't see |
tests/phpunit/test-solrpower-api.php
Outdated
|
||
|
||
function test_server_info_uses_actual_config() { | ||
$env_host = array_key_exists('PANTHEON_INDEX_HOST', $_ENV) ? $_ENV['PANTHEON_INDEX_HOST'] : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm having some issues with my tests - they don't see PANTHEON_INDEX_HOST set in the env. (You can see my past few commits trying to fiddle around with this.) Shouldn't bootstrap.php be taking care of that?
@pavellishin try using getenv
instead of the $_ENV
global
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, duh, I thought the previous code accessed it directly :P
$override_host = $env_host . 'OVERRIDE'; | ||
$override_port = $env_host . 'OVERRIDE'; | ||
|
||
$override_connection = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pavellishin I don't think $override_host
is defined in the context of this function. Maybe pass it in as a parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, dangit. I forget how modern PHP works wrt scoping.
Sorry I abandoned this for a few weeks, busy times at work and home :/ |
Argh, I gotta set up phpunit and a test wordpress DB locally. |
See issue #408