refactor(tests): remove redundant cleanup logic from volume backup and restore tests

This commit is contained in:
Mauricio Siu
2025-12-20 19:52:22 -06:00
parent 0550ab7ed3
commit 0b446d1e2c
2 changed files with 0 additions and 48 deletions

View File

@@ -103,30 +103,6 @@ describe(
await cleanupDocker(currentVolumeName);
await cleanupFiles(currentAppName);
// Clean all test volumes
try {
const { stdout } = await execAsync(
`docker volume ls -q --filter "name=test-vol-" || true`,
);
if (stdout.trim()) {
for (const vol of stdout.trim().split("\n")) {
await execAsync(`docker volume rm ${vol} 2>/dev/null || true`);
}
}
} catch {
// Ignore
}
// Clean all test backup directories
try {
const { VOLUME_BACKUPS_PATH } = paths(false);
await execAsync(
`find "${VOLUME_BACKUPS_PATH}" -maxdepth 1 -type d -name "test-*" -exec rm -rf {} + 2>/dev/null || true`,
);
} catch {
// Ignore
}
console.log("✅ Cleanup done\n");
});

View File

@@ -90,30 +90,6 @@ describe(
await cleanupDocker(currentVolumeName);
await cleanupFiles(currentAppName);
// Clean all test volumes
try {
const { stdout } = await execAsync(
`docker volume ls -q --filter "name=test-vol-" || true`,
);
if (stdout.trim()) {
for (const vol of stdout.trim().split("\n")) {
await execAsync(`docker volume rm ${vol} 2>/dev/null || true`);
}
}
} catch {
// Ignore
}
// Clean all test backup directories
try {
const { VOLUME_BACKUPS_PATH } = paths(false);
await execAsync(
`find "${VOLUME_BACKUPS_PATH}" -maxdepth 1 -type d -name "test-*" -exec rm -rf {} + 2>/dev/null || true`,
);
} catch {
// Ignore
}
console.log("✅ Cleanup done\n");
});