Test env NATS cluster cut-over

This commit is contained in:
George Lambert 2026-09-12 00:00:06 -04:00
commit f813d4003d
7 changed files with 107 additions and 0 deletions

12
test/policy.test.js Normal file
View file

@ -0,0 +1,12 @@
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { leafAllowed, loadPolicy } from '../src/policy.js';
test('leaf may archive and jobs, never billing', () => {
assert.equal(leafAllowed('verae.archive.put'), true);
assert.equal(leafAllowed('verae.archive.reply.abc'), true);
assert.equal(leafAllowed('verae.zapier.jobs.watch'), true);
assert.equal(leafAllowed('verae.billing.balance.adjust'), false);
assert.equal(leafAllowed('verae.billing.statement.get'), false);
assert.ok(loadPolicy().accounts.LEAF.deny_publish.includes('verae.billing.>'));
});