mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
Fix test instance cannot clear database after each test" (#354)
* Update test * Fixed test cannot initialize database * Added a separate network to test containers group to run test while in development mode
This commit is contained in:
parent
d8b26c6da8
commit
5d03e9bda8
7 changed files with 35 additions and 24 deletions
|
|
@ -1,5 +1,5 @@
|
|||
# Database
|
||||
DB_HOSTNAME=immich_postgres_test
|
||||
DB_HOSTNAME=immich-database-test
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=postgres
|
||||
DB_DATABASE_NAME=e2e_test
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
immich_server_test:
|
||||
image: immich-server-dev:latest
|
||||
immich-server-test:
|
||||
image: immich-server-test
|
||||
build:
|
||||
context: ../server
|
||||
dockerfile: Dockerfile
|
||||
|
|
@ -17,15 +17,17 @@ services:
|
|||
environment:
|
||||
- NODE_ENV=development
|
||||
depends_on:
|
||||
- redis
|
||||
- database
|
||||
|
||||
redis:
|
||||
container_name: immich_redis_test
|
||||
- immich-redis-test
|
||||
- immich-database-test
|
||||
networks:
|
||||
- immich-test-network
|
||||
immich-redis-test:
|
||||
container_name: immich-redis-test
|
||||
image: redis:6.2
|
||||
|
||||
database:
|
||||
container_name: immich_postgres_test
|
||||
networks:
|
||||
- immich-test-network
|
||||
immich-database-test:
|
||||
container_name: immich-database-test
|
||||
image: postgres:14
|
||||
env_file:
|
||||
- .env.test
|
||||
|
|
@ -36,5 +38,8 @@ services:
|
|||
PG_DATA: /var/lib/postgresql/data
|
||||
volumes:
|
||||
- /var/lib/postgresql/data
|
||||
ports:
|
||||
- 5432:5432
|
||||
networks:
|
||||
- immich-test-network
|
||||
|
||||
networks:
|
||||
immich-test-network:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue