forked from unimatrix/web
Serve the masterkey catalogue through the existing bounded CP module route
This commit is contained in:
parent
76bbe902fe
commit
e871cca8d9
1 changed files with 3 additions and 1 deletions
2
website/tests/jarvis-generator-router.test.mjs
Normal file
2
website/tests/jarvis-generator-router.test.mjs
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import test from 'node:test';import assert from 'node:assert/strict';import {LocalD1} from './d1-adapter.mjs';import {createPanel} from '../control-panel/server.mjs';
|
||||
test('actual CP router serves the generator and its trusted field catalogue without exposing server executors',async()=>{const db=new LocalD1(),app=createPanel(db);try{for(const file of ['/v2/cp-v2-codex-management.mjs','/v2/cp-v2-key-generator.mjs','/jarvis-master-keys.mjs']){const r=await app(new Request('https://cp.dunerealms.com'+file));assert.equal(r.status,200,file);assert.match(r.headers.get('Content-Type'),/javascript/);}for(const file of ['/node/jarvis-master-generator.mjs','/tools/jarvis-dev-key.mjs'])assert.equal((await app(new Request('https://cp.dunerealms.com'+file))).status,404);}finally{db.close();}});
|
||||
Loading…
Reference in a new issue

Staff