I’m completely new to Vapor and server development and am trying to get up and running. I’ve added the required .env configuration in order to set up postgres but when I run swift test
in a fresh project I get the following error:
2024-06-17T15:41:06-0400 error codes.vapor.application : database-id=psql [AsyncKit] Opening new connection for pool failed: PSQLError(code: connectionError, underlying: NIOPosix.NIOConnectionError(host: “test-banana”, port: 5432, dnsAError: Optional(NIOCore.SocketAddressError.unknown(host: “test-banana”, port: 5432)), dnsAAAAError: Optional(NIOCore.SocketAddressError.unknown(host: “test-banana”, port: 5432)), connectionErrors: []))
Conceptually, how should I be thinking about my connection to Postgres? Do I need to “start” the database to make sure it’s running while my tests run? Do I need to create a user first? I feel like I’m missing something super obvious.