mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
test(server): auth e2e (#3492)
* test(server): auth controller e2e test * test(server): user e2e test * refactor(server): album e2e * fix: linting
This commit is contained in:
parent
9e085c1071
commit
e53625b067
19 changed files with 927 additions and 496 deletions
|
|
@ -1,24 +0,0 @@
|
|||
import { GenericContainer, PostgreSqlContainer } from 'testcontainers';
|
||||
|
||||
export default async () => {
|
||||
process.env.NODE_ENV = 'development';
|
||||
process.env.TYPESENSE_API_KEY = 'abc123';
|
||||
|
||||
const pg = await new PostgreSqlContainer('postgres')
|
||||
.withExposedPorts(5432)
|
||||
.withDatabase('immich')
|
||||
.withUsername('postgres')
|
||||
.withPassword('postgres')
|
||||
.start();
|
||||
|
||||
process.env.DB_PORT = String(pg.getMappedPort(5432));
|
||||
process.env.DB_HOSTNAME = pg.getHost();
|
||||
process.env.DB_USERNAME = pg.getUsername();
|
||||
process.env.DB_PASSWORD = pg.getPassword();
|
||||
process.env.DB_DATABASE_NAME = pg.getDatabase();
|
||||
|
||||
const redis = await new GenericContainer('redis').withExposedPorts(6379).start();
|
||||
|
||||
process.env.REDIS_PORT = String(redis.getMappedPort(6379));
|
||||
process.env.REDIS_HOSTNAME = redis.getHost();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue