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

Read host and port information from solr instance, not Pantheon env variables #411

Closed
wants to merge 10 commits into from
Closed

Read host and port information from solr instance, not Pantheon env variables #411

wants to merge 10 commits into from

Conversation

pavellishin
Copy link
Contributor

See issue #408

  • Need tests

@pavellishin
Copy link
Contributor Author

@danielbachhuber 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?



function test_server_info_uses_actual_config() {
$env_host = array_key_exists('PANTHEON_INDEX_HOST', $_ENV) ? $_ENV['PANTHEON_INDEX_HOST'] : '';
Copy link
Contributor

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

Copy link
Contributor Author

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() {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@pavellishin
Copy link
Contributor Author

Sorry I abandoned this for a few weeks, busy times at work and home :/

@pavellishin
Copy link
Contributor Author

Argh, I gotta set up phpunit and a test wordpress DB locally.

@pavellishin pavellishin closed this Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants