Dashboard-Automatizase/app/api/health/route.test.ts
Luis 2015b130d0 feat: add Dockerfile and Kubernetes manifests for deployment
- Create multi-stage Dockerfile with node:20-alpine
- Add .dockerignore for optimized build context
- Create Kubernetes manifests (deployment, service, ingress, secret)
- Add health check endpoint at /api/health
- Configure next.config.ts with standalone output
- Add comprehensive deployment documentation in README-DEPLOY.md

Story: 4.1 - Criar Dockerfile e Manifests Kubernetes para Deploy

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 19:57:26 -03:00

25 lines
720 B
TypeScript

import { describe, it, expect } from "vitest";
import { GET } from "./route";
describe("Health Check API", () => {
it("deve retornar status 200 e JSON com status 'ok'", async () => {
const response = await GET();
const data = await response.json();
expect(response.status).toBe(200);
expect(data.status).toBe("ok");
});
it("deve retornar timestamp no formato ISO", async () => {
const response = await GET();
const data = await response.json();
expect(data.timestamp).toBeDefined();
expect(typeof data.timestamp).toBe("string");
// Validar formato ISO 8601
const timestamp = new Date(data.timestamp);
expect(timestamp.toISOString()).toBe(data.timestamp);
});
});