Open
Description
Describe the bug
In version 1.2.1, the following update was made:
Fix bug in :meth:pytest_flask.fixtures.live_server where SESSION_COOKIE_DOMAIN was set to false due to original_server_name defaulting to "localhost". The new default is "localhost.localdomain".
This causes issues when we go to make requests to our Flask test server. Specifically we get errors that look like this:
WARNING urllib3.connectionpool:connectionpool.py:871 Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NameResolutionError("<urllib3.connection.HTTPConnection object at 0x16dd5a4d0>: Failed to resolve 'localhost.localdomain' ([Errno 8] nodename nor servname provided, or not known)")': /graphql
When we make a request to url_for
, we get back a URL that looks like http://localhost.localdomain/graphql
instead of http://localhost/graphql
While I know I can add localhost.localdomain
to my local /etc/hosts file, there are many docker images we're using in our CI pipelines that also do not know how to resolve this domain name.