Skip to content

Commit 08d1a65

Browse files
mchwangclaude
andcommitted
Say what the killed-call fake leaves out (#189)
Review round 32. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9cb8324 commit 08d1a65

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎test/docker-sweep.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ it('skips output that is not a network, reports what is not JSON, and never thro
3434
it('reads nothing from a docker call that was killed, whose output may be cut short', () => {
3535
const root = mkdtempSync(join(tmpdir(), 'codeboost-sweep-')); roots.push(root);
3636
const calls = join(root, 'calls');
37-
// A well-formed network line, then the client is killed by a signal before it exits by itself.
37+
// A well-formed network line, then the client is killed by a signal before it exits by itself. The line holds only
38+
// the fields the sweep reads (Docker 27.4 also prints CreatedAt, Driver, IPv6, Internal, Labels and Scope); every
39+
// other call gets no output and exit 0, as Docker 27.4 gives for `ls` with no match.
3840
writeFileSync(join(root, 'docker'), ['#!/bin/sh', `printf '%s\\n' "$*" >> '${calls}'`,
3941
`if [ "$1 $2" = "network ls" ]; then printf '%s\\n' '{"ID":"${'a'.repeat(64)}","Name":"swept"}'; kill -9 $$; fi`, 'exit 0'].join('\n'),
4042
{ mode: 0o755 });

0 commit comments

Comments
 (0)