Skip to content

Commit 9ea38c1

Browse files
Mossakaclaude
andcommitted
fix: add awf-api-proxy to container cleanup
The cleanup script, test fixtures, and docker-manager only removed awf-squid and awf-agent containers. The awf-api-proxy container was missing, causing container name conflicts in CI when api-proxy tests run after a failed/interrupted previous run. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 391f7e2 commit 9ea38c1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

scripts/ci/cleanup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "==========================================="
1212

1313
# First, explicitly remove containers by name (handles orphaned containers)
1414
echo "Removing awf containers by name..."
15-
docker rm -f awf-squid awf-agent 2>/dev/null || true
15+
docker rm -f awf-squid awf-agent awf-api-proxy 2>/dev/null || true
1616

1717
# Cleanup diagnostic test containers
1818
echo "Stopping docker compose services..."

src/docker-manager.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2134,7 +2134,7 @@ describe('docker-manager', () => {
21342134

21352135
expect(mockExecaFn).toHaveBeenCalledWith(
21362136
'docker',
2137-
['rm', '-f', 'awf-squid', 'awf-agent'],
2137+
['rm', '-f', 'awf-squid', 'awf-agent', 'awf-api-proxy'],
21382138
{ reject: false }
21392139
);
21402140
});

src/docker-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ export async function startContainers(workDir: string, allowedDomains: string[],
13521352
// This handles orphaned containers from failed/interrupted previous runs
13531353
logger.debug('Removing any existing containers with conflicting names...');
13541354
try {
1355-
await execa('docker', ['rm', '-f', 'awf-squid', 'awf-agent'], {
1355+
await execa('docker', ['rm', '-f', 'awf-squid', 'awf-agent', 'awf-api-proxy'], {
13561356
reject: false,
13571357
});
13581358
} catch {

tests/fixtures/cleanup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class Cleanup {
2525
async removeContainers(): Promise<void> {
2626
this.log('Removing awf containers by name...');
2727
try {
28-
await execa('docker', ['rm', '-f', 'awf-squid', 'awf-agent']);
28+
await execa('docker', ['rm', '-f', 'awf-squid', 'awf-agent', 'awf-api-proxy']);
2929
} catch (error) {
3030
// Ignore errors (containers may not exist)
3131
}

0 commit comments

Comments
 (0)