mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-15 14:16:16 +00:00
fix: preserve Docker legacy API key during rotation
This commit is contained in:
1 parent
6088ebaa09
commit
30971ebb28
22 files changed
+928
-18
No files matched your search
@@ -49,6 +49,18 @@ beforeEach(() => {
|
||||
calls.push(`config:${args.join(' ')}`);
|
||||
},
|
||||
}));
|
||||
|
||||
mock.module('../../../src/commands/docker/show-key-subcommand', () => ({
|
||||
handleShowKey: async (args: string[]) => {
|
||||
calls.push(`show-key:${args.join(' ')}`);
|
||||
},
|
||||
}));
|
||||
|
||||
mock.module('../../../src/commands/docker/finalize-key-rotation-subcommand', () => ({
|
||||
handleFinalizeKeyRotation: async (args: string[]) => {
|
||||
calls.push(`finalize-key-rotation:${args.join(' ')}`);
|
||||
},
|
||||
}));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -104,4 +116,13 @@ describe('docker command', () => {
|
||||
expect(calls).toEqual(['help']);
|
||||
expect(process.exitCode).toBe(1);
|
||||
});
|
||||
|
||||
it('routes Docker key rotation subcommands', async () => {
|
||||
const handleDockerCommand = await loadHandleDockerCommand();
|
||||
|
||||
await handleDockerCommand(['show-key', '--full']);
|
||||
await handleDockerCommand(['finalize-key-rotation']);
|
||||
|
||||
expect(calls).toEqual(['show-key:--full', 'finalize-key-rotation:']);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user