feat(exports): export datagram handler types and align tests with updated nftables and route security APIs

This commit is contained in:
2026-04-30 09:05:24 +00:00
parent e806f7257f
commit 2933ee5257
14 changed files with 622 additions and 684 deletions
+10 -5
View File
@@ -79,18 +79,23 @@ testFn('NFTables integration tests', async () => {
const status = await smartProxy.getNfTablesStatus();
console.log('NFTables status:', JSON.stringify(status, null, 2));
expect(Object.keys(status).length).toEqual(routes.length);
if (!status) {
throw new Error('Expected NFTables status after SmartProxy start');
}
for (const routeStatus of Object.values(status)) {
expect(routeStatus.active).toBeTrue();
expect(routeStatus.ruleCount.total).toBeGreaterThan(0);
expect(status.activeGroups).toEqual(routes.length);
expect(Object.keys(status.groups).length).toEqual(routes.length);
for (const routeStatus of Object.values(status.groups)) {
expect(routeStatus.ruleCount).toBeGreaterThan(0);
expect(routeStatus.createdAt).toBeGreaterThan(0);
}
await smartProxy.stop();
console.log('SmartProxy stopped');
const finalStatus = await smartProxy.getNfTablesStatus();
expect(Object.keys(finalStatus).length).toEqual(0);
expect(finalStatus).toEqual(null);
});
export default tap.start();