-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix user e2e tests #194
Fix user e2e tests #194
Conversation
The e2e tests still don't seem to work due to migrations not running. Changes: - update user.e2e tests to use new `userService.createUser` method - fix server `typeorm` command to use ORM config - update make test-e2e to re-create database volume every time - add User DTO - update auth.service and user.service to use User DTO - update CreateUserDto making optional properties that are optional
Okay, I have figured out the issue. Here is how to solve it
npm run typeorm -- migration:run && npm run test:e2e
immich_server_test:
image: immich-server-dev:1.9.0
build:
context: ../server
dockerfile: Dockerfile
entrypoint: ["/bin/sh", "./entrypoint-test.sh"]
expose:
- "3000"
volumes:
- ../server:/usr/src/app
- /usr/src/app/node_modules
env_file:
- .env.test
environment:
- NODE_ENV=development
depends_on:
- redis
- database
networks:
- immich_network_test
"typeorm": "node --require ts-node/register ./node_modules/typeorm/cli.js --config src/config/database.config.ts"
migrations: [__dirname + '/../migration/*.{js,ts}'], Now run |
Ah thanks! yeah, just did a quick test, from my PR the only thing missing is adding the |
- add missing `.ts` extension to migrations path - update user e2e test for the new returned User resource
Yeah that missing |
Merge conflict fixed, should be ready to be merged 🙂 |
The e2e tests still don't seem to work due to migrations not running.
Changes:
userService.createUser
methodtypeorm
command to use ORM config