feat: add secret E2E fixture

This commit is contained in:
eding 2026-09-14 23:29:13 +02:00
commit 7b71e21c9d
5 changed files with 51 additions and 0 deletions

11
.maidn/database.yaml Normal file
View file

@ -0,0 +1,11 @@
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: maidn-e2e-secret
namespace: staging
labels:
maidn.io/e2e: "true"
spec:
instances: 1
storage:
size: 1Gi

View file

@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- database.yaml

16
package.json Normal file
View file

@ -0,0 +1,16 @@
{
"name": "maidn-e2e-secret",
"private": true,
"scripts": {
"build": "tsc",
"start": "node dist/index.js"
},
"dependencies": {
"express": "^5.1.0"
},
"devDependencies": {
"@types/express": "^5.0.1",
"@types/node": "^22.15.0",
"typescript": "~5.8.0"
}
}

10
src/index.ts Normal file
View file

@ -0,0 +1,10 @@
import express from 'express';
const secretConfigured = Boolean(process.env.E2E_SECRET);
const app = express();
app.get('/', (_request, response) => {
response.status(secretConfigured ? 200 : 503).send(secretConfigured ? 'maidn-e2e-secret-ready' : 'maidn-e2e-secret-missing');
});
app.listen(process.env.PORT ?? 3000);

10
tsconfig.json Normal file
View file

@ -0,0 +1,10 @@
{
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"outDir": "dist",
"strict": true,
"target": "ES2022"
},
"include": ["src"]
}