mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user