Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/host-iptables-network.test.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { execaResult, mockedExeca, setupHostIptablesTestSuite } from './test-helpers/host-iptables-test-setup';
import { iptablesNetworkTestHelpers } from './host-iptables-network';
import { cleanupFirewallNetwork } from './host-iptables-network';
import { ensureFirewallNetwork } from './host-iptables';
import { iptablesSharedTestHelpers } from './host-iptables-shared';

const { cleanupFirewallNetwork } = iptablesNetworkTestHelpers;

describe('host-iptables (network)', () => {
setupHostIptablesTestSuite(iptablesSharedTestHelpers.resetIpv6State);

Expand Down
9 changes: 4 additions & 5 deletions src/host-iptables-network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ export async function ensureFirewallNetwork(): Promise<{
}

/**
* Removes the firewall network
* Removes the firewall network.
*
* @internal Test-only helper for cleaning up the dedicated firewall network.
*/
async function cleanupFirewallNetwork(): Promise<void> {
export async function cleanupFirewallNetwork(): Promise<void> {
logger.debug(`Removing firewall network '${NETWORK_NAME}'...`);

try {
Expand All @@ -62,6 +64,3 @@ async function cleanupFirewallNetwork(): Promise<void> {
// Don't throw - cleanup should be best-effort
}
}

/** @internal Exposed for testing only */
export const iptablesNetworkTestHelpers = { cleanupFirewallNetwork };
Loading