feat(docker): add production Dockerfile, docker-compose setup and healthcheck API
This commit is contained in:
18
tests/health.test.ts
Normal file
18
tests/health.test.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
|
||||
const DATA_DIR = path.join(process.cwd(), 'app', 'test_data_health');
|
||||
|
||||
describe('Healthcheck API Test', () => {
|
||||
it('soll Volume-Ordner erfolgreich erstellen und beschreiben können', async () => {
|
||||
await fs.mkdir(DATA_DIR, { recursive: true });
|
||||
const testFile = path.join(DATA_DIR, '.vitest_health');
|
||||
|
||||
await fs.writeFile(testFile, 'test', 'utf-8');
|
||||
const content = await fs.readFile(testFile, 'utf-8');
|
||||
await fs.unlink(testFile);
|
||||
|
||||
expect(content).toBe('test');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user