CI/CD - CodeBuild + CodeDeploy + CodePipeline

This commit is contained in:
Zakaria
2026-10-01 09:18:04 -04:00
parent aa02cdb7f6
commit 7f0d707578
41 changed files with 1817 additions and 78 deletions
+21
View File
@@ -448,6 +448,27 @@ describe('database snapshot routes', () => {
})
})
describe('resource lifecycle routes', () => {
test('routes start, stop, and reboot through the generic adapter lifecycle operations', async () => {
const calls: string[] = []
const app = appWithRoutes([mockAdapter('aws', {
service: 'database',
schema: awsDatabaseSchema,
start: async (id) => { calls.push(`start:${id}`) },
stop: async (id) => { calls.push(`stop:${id}`) },
reboot: async (id) => { calls.push(`reboot:${id}`) },
})])
for (const action of ['start', 'stop', 'reboot']) {
const response = await app.request(`/api/clouds/aws/services/database/resources/orders-db/${action}`, {method: 'POST'})
expect(response.status).toBe(200)
expect(await response.json()).toEqual({ok: true})
}
expect(calls).toEqual(['start:orders-db', 'stop:orders-db', 'reboot:orders-db'])
})
})
describe('cloud schema routes', () => {
test('returns AWS storage schema', async () => {
const res = await appWithRoutes().request('/api/clouds/aws/services/storage/schema')