feat(core): FILIUS' web server and web browser after Java, measured against Java
The servers share ServerAnwendung's frame (server.ts); the web server serves /webserver with virtual hosts, the browser loads a page and its images over one connection to port 80 (web.ts); HTTP in Java's text form (http.ts). WebRun records eleven stories on the new web-lan network, with the server's files; webJava.test.ts plays them card by card. A program's close is a request, as Java's schliessen. Not taken from Java: /../ serving any file of the host; an unreadable request closing the connection without a word. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -749,6 +749,30 @@ describe('importProject rules', () => {
|
||||
expect([...snapshot.simpleClientsByNodeId]).toEqual([[off, { targetAddress: '10.0.0.1', targetPort: 7 }]]);
|
||||
});
|
||||
|
||||
it('runs every web server, switched on or off, every web browser, on the nodes\' files (projectSnapshot)', () => {
|
||||
const source = flsNode('Rechner').source;
|
||||
const webServer = (isActive: boolean): FlsApplication => ({ key: 'web', javaClass: 'filius.software.www.WebServer', source, isActive, port: 80 });
|
||||
const browser: FlsApplication = { key: 'browser', javaClass: 'filius.software.www.WebBrowser', source };
|
||||
const project = importProject(
|
||||
topology({
|
||||
nodes: [
|
||||
flsNode('Rechner', { interfaces: [nic('10.0.0.1')], system: { applications: [webServer(true)] } }),
|
||||
flsNode('Rechner', { interfaces: [nic('10.0.0.2')], system: { applications: [webServer(false), browser] } }),
|
||||
],
|
||||
}),
|
||||
counter(),
|
||||
);
|
||||
const [on, off] = project.graph.nodes.map((node) => node.id);
|
||||
const snapshot = projectSnapshot(project);
|
||||
|
||||
expect([...snapshot.webServersByNodeId]).toEqual([
|
||||
[on, { port: 80, documentRoot: '/webserver', virtualHosts: false, isActive: true }],
|
||||
[off, { port: 80, documentRoot: '/webserver', virtualHosts: false, isActive: false }],
|
||||
]);
|
||||
expect([...snapshot.webBrowserNodeIds]).toEqual([off]);
|
||||
expect(snapshot.fileSystemsByNodeId).toBe(project.virtualFileSystems);
|
||||
});
|
||||
|
||||
it("keeps a node's IP forwarding where it differs from its kind's: a host that forwards, a router that does not", () => {
|
||||
const system = (ipForwardingEnabled: boolean) => ({ manualRoutes: [], ipForwardingEnabled });
|
||||
const project = importProject(
|
||||
|
||||
Reference in New Issue
Block a user