Node.js interface to UFW forked to allow execution of your Node process as non-root user.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
699 B

import test from "ava";
import * as ufw from "./src/Index";
test("allow port", async (t) => t.true(await ufw.allow.port(1337)));
test("allow ip address", async (t) => t.true(await ufw.allow.address("1.1.1.1")));
test("delete specific rule", async (t) => t.true(await ufw.delete(1)));
test("deny port", async (t) => t.true(await ufw.deny.port(1337)));
test("deny ip address", async (t) => t.true(await ufw.deny.address("1.1.1.1")));
test("enable firewall", async (t) => t.true(await ufw.enable()));
test("disable firewall", async (t) => t.true(await ufw.disable()));
test("reload firewall", async (t) => t.true(await ufw.reload()));
test("reset firewall", async (t) => t.true(await ufw.reset()));