Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: the egress card on the swarm page lists and edits the swarm-wide denied domains, and says which hives have not applied them

This commit is contained in:
iris 2026-11-04 23:04:28 +01:00 • committed by mara
commit 0421f28d49

View file

@ -6,6 +6,7 @@ import {
allowedSummary,
entryGroups,
swarmWideEntries,
behindNote,
entriesFor,
entryBody,
} from "../src/agent/detail/allowed-domains.ts";
@ -104,3 +105,12 @@ test("the egress card lists only the entries that hold for every agent", () => {
test("an add from the swarm page, with no agent, is a swarm-wide entry", () => {
assert.deepEqual(entryBody("github.com", true, ""), { domain: "github.com" });
});
test("the deny list names the hives that have not applied it, and says nothing when none is behind", () => {
assert.equal(behindNote([]), null);
assert.match(behindNote(["pr1ma"]), /^pr1ma has not applied this list yet/);
assert.match(
behindNote(["pr1ma", "mu3de"]),
/^pr1ma, mu3de have not applied this list yet/,
);
});