Implement getServerListeningConfig plugin helper

This commit is contained in:
Chocobozzz
2023-01-04 11:52:45 +01:00
parent 518c5cc62d
commit 60bab7b540
4 changed files with 25 additions and 0 deletions

View File

@@ -64,6 +64,18 @@ describe('Test plugin helpers', function () {
await servers[0].servers.waitUntilLog(`server url is ${servers[0].url}`)
})
it('Should have the correct listening config', async function () {
const res = await makeGetRequest({
url: servers[0].url,
path: '/plugins/test-four/router/server-listening-config',
expectedStatus: HttpStatusCode.OK_200
})
expect(res.body.config).to.exist
expect(res.body.config.hostname).to.equal('::')
expect(res.body.config.port).to.equal(servers[0].port)
})
it('Should have the correct config', async function () {
const res = await makeGetRequest({
url: servers[0].url,