# docker compose up # connect with psql postgresql://postgres:password@localhost:5434 # TEST_DATABASE_URI="postgresql://postgres:password@localhost:5434" go test -timeout 30s -run ^TestHandleMultiPayInvoiceEvent_IsolatedApp_ConcurrentPayments$ github.com/getAlby/hub/nip47/controllers # or # TEST_DATABASE_URI="postgresql://postgres:password@localhost:5434" go test -timeout 30s -run ^TestHandleMultiPayKeysendEvent_IsolatedApp_ConcurrentPayments$ github.com/getAlby/hub/nip47/controllers version: "3.6" services: pgtestdb: image: postgres:15 environment: POSTGRES_PASSWORD: password restart: unless-stopped volumes: # Uses a tmpfs volume to make tests extremely fast. The data in test # databases is not persisted across restarts, nor does it need to be. - type: tmpfs target: /var/lib/postgresql/data/ command: - "postgres" - "-c" # turn off fsync for speed - "fsync=off" - "-c" # log everything for debugging - "log_statement=all" ports: # Entirely up to you what port you want to use while testing. - "5434:5432"