Skip to content

Commit 14f9560

Browse files
committed
chore: ensure kind network is removed at the end of tests
The network was not properly cleaned because it can only be removed after deleting the KinD cluster (otherwise the network is still in use and Docker refuses to delete it).
1 parent 9274ecd commit 14f9560

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/integration/kubernetes.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ tap.tearDown(async() => {
2222
console.log('Begin removing the snyk-monitor...');
2323
await setup.removeMonitor();
2424
console.log('Removed the snyk-monitor!');
25+
26+
console.log('Begin removing "kind" network...');
27+
await setup.removeUnusedKindNetwork();
28+
console.log('Removed "kind" network');
2529
});
2630

2731
// Make sure this runs first -- deploying the monitor for the next tests
@@ -249,9 +253,6 @@ tap.test('snyk-monitor pulls images from a local registry and sends data to kube
249253
console.log('Begin removing local container registry...');
250254
await setup.removeLocalContainerRegistry();
251255
console.log('Removed local container registry');
252-
console.log('Begin removing "kind" network...');
253-
await setup.removeUnusedKindNetwork();
254-
console.log('Removed "kind" network');
255256
});
256257

257258
if (process.env['TEST_PLATFORM'] !== 'kind') {

0 commit comments

Comments
 (0)