mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-30 03:59:41 +00:00
feat(stacks): per-service start/stop/restart lifecycle actions (#778)
* feat(stacks): add per-service start/stop/restart lifecycle routes
Adds POST /:stackName/services/:serviceName/{start,stop,restart} routes
that operate on containers belonging to a single Compose service, using
the same Engine API pattern as the existing stack-level lifecycle routes.
Includes isValidServiceName validator and audit-summary entries for the
three new paths.
* test(stacks): add per-service action route tests
* test(stacks): fix test quality issues in service action tests
* feat(stacks): add per-service lifecycle menu to container cards
* fix(stacks): handle paused container state in service action menu
* docs(stacks): add per-service lifecycle actions documentation
* docs(stacks): add validation screenshots for per-service lifecycle actions
This commit is contained in:
@@ -65,6 +65,18 @@ describe('getAuditSummary()', () => {
|
||||
expect(getAuditSummary('POST', '/stacks/mystack/rollback')).toBe('Rolled back stack: mystack');
|
||||
});
|
||||
|
||||
it('resolves per-service restart summary (stack name as resource)', () => {
|
||||
expect(getAuditSummary('POST', '/stacks/web/services/app/restart')).toBe('Restarted stack service: web');
|
||||
});
|
||||
|
||||
it('resolves per-service stop summary (stack name as resource)', () => {
|
||||
expect(getAuditSummary('POST', '/stacks/web/services/app/stop')).toBe('Stopped stack service: web');
|
||||
});
|
||||
|
||||
it('resolves per-service start summary (stack name as resource)', () => {
|
||||
expect(getAuditSummary('POST', '/stacks/web/services/app/start')).toBe('Started stack service: web');
|
||||
});
|
||||
|
||||
it('decodes URL-encoded resource names', () => {
|
||||
expect(getAuditSummary('POST', '/stacks/my%20stack/deploy')).toBe('Deployed stack: my stack');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user