Closed apolkingg8 closed 2 years ago
👀
@apolkingg8 can you provide the commands you're using to run the tests, and information about the environment?
It looks like the database initialization scripts (e.g. migrations) have not been run.
Sure, please try branch 161_deploy-contract
and the test case is in apps/app-e2e/src/api-dispute.spec.ts/events
.
Before the DB migration scripts, I think the POSTGRES_SERVER=localhost
should works fine, there is no reason to change to POSTGRES_SERVER=host.docker.internal
. May you test this part?
Some note:
POSTGRES_SERVER=host.docker.internal
and upgrade nx-python-poetry
, got new error:
[api-dispute] ERROR [alembic.util.messaging] Can't locate revision identified by '3543c7aaeaae'
[api-dispute] FAILED: Can't locate revision identified by '3543c7aaeaae'
[api-dispute] /usr/src
[api-dispute] Poetry command failed:
[api-dispute] > poetry run alembic upgrade head
I'm looking into it. For the hostname, as kerbernetes create and manage a separate network for the whole cluster. Some configuration for the applications should be updated accordingly.
Let me know if there's something I can take a look at, I have been doing a bit of k8s configuration lately.
@apolkingg8 The database initialization should work now.
The test passed! Thanks a lot :)
Got DB connection error when testing the
api-dispute
app:I'm pretty sure the
127.0.0.1:5432
works fine because I can connect it with other applications. If I replace thePOSTGRES_SERVER=localhost
withPOSTGRES_SERVER=host.docker.internal
the connection would be fixed, but it causes another issue about DB init: