-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow running the webserver portion standalone. (#184)
* Update packages + add missing packages * Drop postcss in favour of sass-loader * Update lockfile * Add support for specifying a "runmode" + split out web routes * Explicitly use qs package as webpack5 does not provide a polyfill * Replace 7 year old string-template library with a simple typed implementation * Ensure we build the web typescript with a DOM build config * Fix run check
- Loading branch information
Showing
18 changed files
with
1,059 additions
and
2,607 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
testTimeout: 30000, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { AddressInfo } from "net"; | ||
import { RunMode } from "../src/config"; | ||
import { E2ESetupTestTimeout, E2ETestEnv } from "./util/e2e-test"; | ||
import { describe, it, beforeEach, afterEach, expect } from "@jest/globals"; | ||
import * as fetch from "node-fetch"; | ||
|
||
describe('Webserver', () => { | ||
let testEnv: E2ETestEnv; | ||
beforeEach(async () => { | ||
testEnv = await E2ETestEnv.createTestEnv({ | ||
fixture: 'basic-conference', | ||
config: { | ||
mode: RunMode.webserver, | ||
} | ||
}); | ||
await testEnv.setUp(); | ||
}, E2ESetupTestTimeout); | ||
afterEach(() => { | ||
return testEnv?.tearDown(); | ||
}); | ||
it('should start up successfully', async () => { | ||
const serverAddress = testEnv.confBot.webServer?.address() as AddressInfo; | ||
const req = await fetch(`http://${serverAddress.address}:${serverAddress.port}/healthz`, {}); | ||
expect(req.status).toBe(200); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.