MCPcopy Create free account
hub / github.com/ShipSecAI/studio / cleanup

Function cleanup

e2e-tests/cleanup.ts:63–96  ·  view source on GitHub ↗

* Main cleanup function

()

Source from the content-addressed store, hash-verified

61 * Main cleanup function
62 */
63async function cleanup() {
64 console.log('🧹 E2E Test Cleanup');
65 console.log('');
66
67 try {
68 // Fetch all workflows
69 const workflows = await getWorkflows();
70
71 // Filter test workflows (those starting with "Error Test:")
72 const testWorkflows = workflows.filter((wf: any) =>
73 wf.name?.startsWith(TEST_WORKFLOW_PREFIX)
74 );
75
76 if (testWorkflows.length === 0) {
77 console.log('✨ No test workflows found - workspace is clean');
78 return;
79 }
80
81 console.log(`Found ${testWorkflows.length} test workflow(s):`);
82
83 // Delete each test workflow
84 for (const workflow of testWorkflows) {
85 await deleteWorkflow(workflow.id, workflow.name);
86 }
87
88 console.log('');
89 console.log(`✨ Cleanup complete - deleted ${testWorkflows.length} test workflow(s)`);
90
91 } catch (error) {
92 console.error('');
93 console.error('❌ Cleanup failed:', error);
94 process.exit(1);
95 }
96}
97
98// Run cleanup
99cleanup().catch(error => {

Callers 5

sendMethod · 0.85
pumpMethod · 0.85
cleanup.tsFile · 0.85

Calls 3

getWorkflowsFunction · 0.85
deleteWorkflowFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected