test: add unraid docker test harness
This commit is contained in:
parent
d2ed667f0c
commit
f8bd8e0ef0
5 changed files with 31 additions and 5 deletions
10
Dockerfile.test
Normal file
10
Dockerfile.test
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
FROM node:22-bookworm
|
||||||
|
|
||||||
|
WORKDIR /app/backend
|
||||||
|
|
||||||
|
COPY backend/package*.json ./
|
||||||
|
RUN npm ci
|
||||||
|
|
||||||
|
COPY backend/ ./
|
||||||
|
|
||||||
|
CMD ["npm", "test"]
|
||||||
|
|
@ -11,6 +11,12 @@ Erster funktionaler Backend-Stand für die Vision:
|
||||||
- Kontaktdatenaustausch nach Deal (`/contacts/request`, `/contacts/respond`, `/contacts/deal/:dealId`)
|
- Kontaktdatenaustausch nach Deal (`/contacts/request`, `/contacts/respond`, `/contacts/deal/:dealId`)
|
||||||
- Serverseitige AES-256-GCM-Verschlüsselung für Adresse/Telefon (`DATA_ENCRYPTION_KEY`)
|
- Serverseitige AES-256-GCM-Verschlüsselung für Adresse/Telefon (`DATA_ENCRYPTION_KEY`)
|
||||||
|
|
||||||
|
## Docker-Test (Unraid Host)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/test-in-docker.sh
|
||||||
|
```
|
||||||
|
|
||||||
## Start
|
## Start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,7 @@ Stabile, sichere Releases durch standardisierte Tests in Docker auf dem Unraid-H
|
||||||
Im Repo-Root ausführen:
|
Im Repo-Root ausführen:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run --rm -t \
|
./scripts/test-in-docker.sh
|
||||||
-v "$PWD":/app \
|
|
||||||
-w /app/backend \
|
|
||||||
node:22-bookworm \
|
|
||||||
bash -lc "npm ci && npm test"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Mindest-Testumfang
|
## Mindest-Testumfang
|
||||||
|
|
|
||||||
7
docker-compose.test.yml
Normal file
7
docker-compose.test.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
services:
|
||||||
|
backend-test:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile.test
|
||||||
|
working_dir: /app/backend
|
||||||
|
command: npm test
|
||||||
7
scripts/test-in-docker.sh
Executable file
7
scripts/test-in-docker.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
docker compose -f docker-compose.test.yml build --no-cache backend-test
|
||||||
|
docker compose -f docker-compose.test.yml run --rm backend-test
|
||||||
Loading…
Add table
Add a link
Reference in a new issue