feat(ux-37): add /api/version deployment metadata endpoint and CI verification gate
Deploy Canina / deploy (push) Successful in 2m9s
Deploy Canina / deploy (push) Successful in 2m9s
This commit is contained in:
1 parent
961bb383db
commit
87bf867513
2 files changed
+52
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { GET } from './route';
|
||||
|
||||
describe('Deployment Metadata Endpoint Gate (UX-37)', () => {
|
||||
it('returns valid deployment signature, status and commit header', async () => {
|
||||
const response = await GET();
|
||||
expect(response.status).toBe(200);
|
||||
|
||||
const data = await response.json();
|
||||
expect(data.status).toBe('ok');
|
||||
expect(data.service).toBe('frontend');
|
||||
expect(data).toHaveProperty('commitSha');
|
||||
expect(data).toHaveProperty('buildTime');
|
||||
expect(data).toHaveProperty('environment');
|
||||
|
||||
expect(response.headers.get('Cache-Control')).toBe('no-store, no-cache, must-revalidate');
|
||||
expect(response.headers.get('X-Commit-Sha')).toBeDefined();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user