+
+ it('Should log ping requests', async function () {
+ this.timeout(10000)
+
+ const now = new Date()
+
+ await makePingRequest(server)
+
+ const res = await getLogs(server.url, server.accessToken, now, undefined, 'info')
+ const logsString = JSON.stringify(res.body)
+
+ expect(logsString.includes('/api/v1/ping')).to.be.true
+ })
+
+ it('Should not log ping requests', async function () {
+ this.timeout(30000)
+
+ killallServers([ server ])
+
+ await reRunServer(server, { log: { log_ping_requests: false } })
+
+ const now = new Date()
+
+ await makePingRequest(server)
+
+ const res = await getLogs(server.url, server.accessToken, now, undefined, 'info')
+ const logsString = JSON.stringify(res.body)
+
+ expect(logsString.includes('/api/v1/ping')).to.be.false
+ })