mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
test(server): full backend end-to-end testing with microservices (#4225)
* feat: asset e2e with job option * feat: checkout test assets * feat: library e2e tests * fix: use node 21 in e2e * fix: tests * fix: use normalized external path * feat: more external path tests * chore: use parametrized tests * chore: remove unused test code * chore: refactor test asset path * feat: centralize test app creation * fix: correct error message for missing assets * feat: test file formats * fix: don't compare checksum * feat: build libvips * fix: install meson * fix: use immich test asset repo * feat: test nikon raw files * fix: set Z timezone * feat: test offline library files * feat: richer metadata tests * feat: e2e tests in docker * feat: e2e test with arm64 docker * fix: manual docker compose run * fix: remove metadata processor import * fix: run e2e tests in test.yml * fix: checkout e2e assets * fix: typo * fix: checkout files in app directory * fix: increase e2e memory * fix: rm submodules * fix: revert action name * test: mark file offline when external path changes * feat: rename env var to TEST_ENV * docs: new test procedures * feat: can run docker e2e tests manually if needed * chore: use new node 20.8 for e2e * chore: bump exiftool-vendored * feat: simplify test launching * fix: rename env vars to use immich_ prefix * feat: asset folder is submodule * chore: cleanup after 20.8 upgrade * fix: don't log postgres in e2e * fix: better warning about not running all tests --------- Co-authored-by: Jonathan Jogenfors <jonathan@jogenfors.se>
This commit is contained in:
parent
2f9d0a2404
commit
8d5bf93360
30 changed files with 1245 additions and 534 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { LoginResponseDto } from '@app/domain';
|
||||
import { AppModule, ServerInfoController } from '@app/immich';
|
||||
import { ServerInfoController } from '@app/immich';
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { api } from '@test/api';
|
||||
import { db } from '@test/db';
|
||||
import { errorStub } from '@test/fixtures';
|
||||
import { createTestApp } from '@test/test-utils';
|
||||
import request from 'supertest';
|
||||
|
||||
describe(`${ServerInfoController.name} (e2e)`, () => {
|
||||
|
|
@ -14,11 +14,7 @@ describe(`${ServerInfoController.name} (e2e)`, () => {
|
|||
let loginResponse: LoginResponseDto;
|
||||
|
||||
beforeAll(async () => {
|
||||
const moduleFixture: TestingModule = await Test.createTestingModule({
|
||||
imports: [AppModule],
|
||||
}).compile();
|
||||
|
||||
app = await moduleFixture.createNestApplication().init();
|
||||
app = await createTestApp();
|
||||
server = app.getHttpServer();
|
||||
});
|
||||
|
||||
|
|
@ -81,9 +77,9 @@ describe(`${ServerInfoController.name} (e2e)`, () => {
|
|||
const { status, body } = await request(server).get('/server-info/features');
|
||||
expect(status).toBe(200);
|
||||
expect(body).toEqual({
|
||||
clipEncode: true,
|
||||
clipEncode: false,
|
||||
configFile: false,
|
||||
facialRecognition: true,
|
||||
facialRecognition: false,
|
||||
map: true,
|
||||
reverseGeocoding: true,
|
||||
oauth: false,
|
||||
|
|
@ -91,7 +87,7 @@ describe(`${ServerInfoController.name} (e2e)`, () => {
|
|||
passwordLogin: true,
|
||||
search: false,
|
||||
sidecar: true,
|
||||
tagImage: true,
|
||||
tagImage: false,
|
||||
trash: true,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue