You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
The server_name is set to the default localhost.localdomain only when it's not explicitly specified. As a workaround I suggest to explicitly set server_name to the localhost in your test application config.
Describe the bug
In version 1.2.1, the following update was made:
This causes issues when we go to make requests to our Flask test server. Specifically we get errors that look like this:
When we make a request to
url_for
, we get back a URL that looks likehttp://localhost.localdomain/graphql
instead ofhttp://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.The text was updated successfully, but these errors were encountered: