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
Tras levantar la aplicación con docker-compose, al intentar correr las pruebas con docker run ./manage.py test se devuelve un fallo que parece estar relacionado con la no accesibilidad del contenedor "db" para la base de datos. Copia del error:
/usr/local/lib/python3.8/site-packages/django/db/backends/postgresql/base.py:253: RuntimeWarning: Normally Django will use a connection to the 'postgres' database to avoid running initialization queries against the production database when it's not needed (for example, when running tests). Django was unable to create a connection to the 'postgres' database and will use the default database instead.
warnings.warn(
nosetests --verbosity=1
Creating test database for alias 'default'...
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 216, in ensure_connection
self.connect()
File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "/usr/local/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 168, in get_new_connection
connection = Database.connect(**conn_params)
File "/usr/local/lib/python3.8/site-packages/psycopg2/init.py", line 126, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not translate host name "db" to address: Name does not resolve
The text was updated successfully, but these errors were encountered:
Tras levantar la aplicación con docker-compose, al intentar correr las pruebas con
docker run ./manage.py test
se devuelve un fallo que parece estar relacionado con la no accesibilidad del contenedor "db" para la base de datos. Copia del error:The text was updated successfully, but these errors were encountered: