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

Remove broken attempt to find hostname on Linux #1935

Closed
wants to merge 1 commit into from

Conversation

threedaymonk
Copy link
Collaborator

@threedaymonk threedaymonk commented Oct 10, 2024

This snippet didn't work on Linux, at least for me: instead of returning a hostname, the shell snippet returned multiple lines which could not be resolved.

Hypothesis: the default behaviour of not specifying the Capybara host will result in a sensible default of localhost. By setting server_host iff the environment variable is set, we can fall back to Capybara's reasonable default.

Changes in this PR

Removes the shell snippet used to find the Capybara hostname on Linux and the 127.0.0.1 used otherwise, and does not configure server_host at all unless explicitly set via the CAPYBARA_SERVER_HOST environment variable. As Capybara starts the server, it does not usually need help to find it.

This snippet didn't work on Linux, at least for me: instead of returning
a hostname, the shell snippet returned multiple lines which could not be
resolved.

Hypothesis: the default behaviour of not specifying the Capybara host
will result in a sensible default of localhost. By setting server_host
iff the environment variable is set, we can fall back to Capybara's
reasonable default.
Copy link

sonarcloud bot commented Oct 10, 2024

@threedaymonk
Copy link
Collaborator Author

Fixing on a local machine breaks the CI, so I'm withdrawing this and just setting CAPYBARA_SERVER_HOST=localhost in my .env.test.local file.

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.

1 participant