mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 12:19:35 +00:00
test(docker): update executor tests for export syntax and build timeout
Align test assertions with the env var export pattern and the 5-minute build timeout used by up and update operations.
This commit is contained in:
@@ -53,7 +53,7 @@ describe('docker executor', () => {
|
|||||||
expect(calls[0].options?.env?.CCS_NPM_VERSION).toBe('7.59.0');
|
expect(calls[0].options?.env?.CCS_NPM_VERSION).toBe('7.59.0');
|
||||||
expect(calls[0].options?.env?.CCS_DASHBOARD_PORT).toBe('4000');
|
expect(calls[0].options?.env?.CCS_DASHBOARD_PORT).toBe('4000');
|
||||||
expect(calls[0].options?.env?.CCS_CLIPROXY_PORT).toBe('9317');
|
expect(calls[0].options?.env?.CCS_CLIPROXY_PORT).toBe('9317');
|
||||||
expect(calls[0].options?.timeoutMs).toBe(10_000);
|
expect(calls[0].options?.timeoutMs).toBe(300_000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('stages bundled assets before remote compose startup', async () => {
|
it('stages bundled assets before remote compose startup', async () => {
|
||||||
@@ -86,11 +86,11 @@ describe('docker executor', () => {
|
|||||||
expect(calls[1].options).toEqual({ remote: true, timeoutMs: 30_000 });
|
expect(calls[1].options).toEqual({ remote: true, timeoutMs: 30_000 });
|
||||||
expect(calls[2].command).toBe('ssh');
|
expect(calls[2].command).toBe('ssh');
|
||||||
expect(calls[2].args[0]).toBe('docker');
|
expect(calls[2].args[0]).toBe('docker');
|
||||||
expect(calls[2].args[1]).toContain("CCS_NPM_VERSION='7.59.0'");
|
expect(calls[2].args[1]).toContain("export CCS_NPM_VERSION='7.59.0'");
|
||||||
expect(calls[2].args[1]).toContain("CCS_DASHBOARD_PORT='3000'");
|
expect(calls[2].args[1]).toContain("export CCS_DASHBOARD_PORT='3000'");
|
||||||
expect(calls[2].args[1]).toContain("CCS_CLIPROXY_PORT='8317'");
|
expect(calls[2].args[1]).toContain("export CCS_CLIPROXY_PORT='8317'");
|
||||||
expect(calls[2].args[1]).toContain('docker-compose version >/dev/null 2>&1');
|
expect(calls[2].args[1]).toContain('docker-compose version >/dev/null 2>&1');
|
||||||
expect(calls[2].options?.timeoutMs).toBe(30_000);
|
expect(calls[2].options?.timeoutMs).toBe(300_000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('uses npm install latest rather than npm update during in-container updates', async () => {
|
it('uses npm install latest rather than npm update during in-container updates', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user