immich/e2e/src/api/specs
Robert Schäfer 573e9b0d52
refactor(dev): dockerify auth-server (#24377)
Description
-----------

A while ago I asked on Discord if you people would be interested in removing incompatibilities with rootless docker. See: https://discord.com/channels/979116623879368755/1071165397228855327/1442974448776122592

The e2e tests in `e2e/src/api/specs/oauth.e2e-spec.ts` depend on a docker feature [host-gateway](https://docs.docker.com/reference/cli/dockerd/#configure-host-gateway-ip) that seemingly does not work on rootless docker.

So the suggested change is to dockerify the `auth-server` and not run it on the docker host.

I would love to receive feedback on this PR and feel free to request further improvements. Things that come to my mind:

* Compile typescript instead of using `tsx`
* Add hot-reloading of source files in `auth-server/` for development
* Add `eslint` configuration for the new folder

How Has This Been Tested?
------------------------

I'm running both default and rootless docker on my machine with [docker contexts](https://docs.docker.com/engine/manage-resources/contexts/):
```
docker context ls
NAME         DESCRIPTION                               DOCKER ENDPOINT                     ERROR
default                                                unix:///var/run/docker.sock
rootless *                                             unix:///run/user/1000/docker.sock
```

If I follow the steps from the [documentation](https://docs.immich.app/developer/testing) then `oauth.e2e-spec.ts` will fail because the `auth-server` on my host can't be reached.

The tests pass after these steps:
1. `git switch refactor-auth-server-as-service`
2. `make e2e`
3. In another terminal `cd e2e`
4. `pnpm run test src/api/specs/oauth.e2e-spec.ts` passes

Checklist:
----------

- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation if applicable
- [x] I have no unrelated changes in the PR.
- [ ] I have confirmed that any new dependencies are strictly necessary.
- [ ] I have written tests for new code (if applicable)
- [ ] I have followed naming conventions/patterns in the surrounding code
- [ ] All code in `src/services/` uses repositories implementations for database calls, filesystem operations, etc.
- [ ] All code in `src/repositories/` is pretty basic/simple and does not have any immich specific logic (that belongs in `src/services/`)
2026-01-09 08:59:11 -05:00
..
activity.e2e-spec.ts fix(server): clear activity when asset is removed from album (#19019) 2025-07-10 19:37:56 +02:00
album.e2e-spec.ts feat(album): show per-user contributions in shared albums (#21740) 2025-10-14 17:34:20 -04:00
api-key.e2e-spec.ts feat: rename schema (#19891) 2025-07-14 10:13:06 -04:00
asset.e2e-spec.ts feat: exif medium tests (#23561) 2025-11-04 16:03:02 -05:00
download.e2e-spec.ts refactor: controller tests (#18100) 2025-05-05 18:57:32 -04:00
jobs.e2e-spec.ts refactor: job vs queue naming (#23902) 2025-11-14 14:42:00 -05:00
library.e2e-spec.ts chore(server): sidecars in asset_files (#21199) 2025-12-02 13:31:43 -05:00
maintenance.e2e-spec.ts feat: maintenance mode (#23431) 2025-11-17 17:15:44 +00:00
map.e2e-spec.ts feat(server): visibility column (#17939) 2025-05-06 12:12:48 -05:00
memory.e2e-spec.ts refactor: memory medium tests (#19568) 2025-06-26 19:52:10 -04:00
oauth.e2e-spec.ts refactor(dev): dockerify auth-server (#24377) 2026-01-09 08:59:11 -05:00
partner.e2e-spec.ts feat: add partner create endpoint (#21625) 2025-09-05 17:59:11 -04:00
person.e2e-spec.ts fix: people ordering by asset count (#19366) 2025-06-20 07:34:04 -05:00
search.e2e-spec.ts feat(server): visibility column (#17939) 2025-05-06 12:12:48 -05:00
server.e2e-spec.ts feat: maintenance mode (#23431) 2025-11-17 17:15:44 +00:00
session.e2e-spec.ts refactor(server): sessions (#8915) 2024-04-19 06:47:29 -04:00
shared-link.e2e-spec.ts fix: shared-link-mapper (#24794) 2026-01-05 10:03:35 -05:00
stack.e2e-spec.ts fix(web): No EXIF info on stack navigation (#15533) 2025-01-23 15:22:27 +00:00
system-config.e2e-spec.ts feat: nightly tasks (#19879) 2025-07-11 17:32:10 -04:00
system-metadata.e2e-spec.ts refactor: system metadata (#8923) 2024-04-19 20:36:15 -04:00
tag.e2e-spec.ts refactor: job events (#23161) 2025-10-22 12:16:55 -04:00
trash.e2e-spec.ts chore(server): trash e2e cleanup (#16423) 2025-02-28 12:45:30 -05:00
user-admin.e2e-spec.ts refactor: job vs queue naming (#23902) 2025-11-14 14:42:00 -05:00
user.e2e-spec.ts chore: update response codes (#20770) 2025-08-08 15:56:37 -04:00