(headers = {}, body = '')
| 24 | const log = new DummyRequestLogger(); |
| 25 | |
| 26 | function prepareDummyRequest(headers = {}, body = '') { |
| 27 | const request = new DummyRequest( |
| 28 | { |
| 29 | hostname: 'localhost', |
| 30 | method: 'PUT', |
| 31 | url: '/_/backbeat/metadata/bucket0/key0', |
| 32 | port: 80, |
| 33 | headers, |
| 34 | socket: { |
| 35 | remoteAddress: '0.0.0.0', |
| 36 | destroy: () => {}, |
| 37 | on: () => {}, |
| 38 | removeListener: () => {}, |
| 39 | }, |
| 40 | }, |
| 41 | body || '{"replicationInfo":"{}"}', |
| 42 | ); |
| 43 | return request; |
| 44 | } |
| 45 | |
| 46 | describe('routeBackbeat', () => { |
| 47 | let mockResponse; |
no outgoing calls
no test coverage detected