Skip to content

Commit

Permalink
test: update intake API endpoint path (#581)
Browse files Browse the repository at this point in the history
  • Loading branch information
watson authored Sep 13, 2018
1 parent df9d73b commit 82a1c3a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/_apm_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function APMServer (agentOpts, mockOpts) {

var server = self.server = http.createServer(function (req, res) {
assert.strictEqual(req.method, 'POST', `Unexpected HTTP method: ${req.method}`)
assert.strictEqual(req.url, '/v2/intake', `Unexpected HTTP url: ${req.url}`)
assert.strictEqual(req.url, '/intake/v2/events', `Unexpected HTTP url: ${req.url}`)

self.emit('request', req, res)
var expect = requests.shift()
Expand Down
2 changes: 1 addition & 1 deletion test/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ assertStackTrace.asserts = 4
function validateRequest (t) {
return function (req) {
t.equal(req.method, 'POST', 'should be a POST request')
t.equal(req.url, '/v2/intake', 'should be sent to the intake endpoint')
t.equal(req.url, '/intake/v2/events', 'should be sent to the intake endpoint')
}
}
validateRequest.asserts = 2
Expand Down
2 changes: 1 addition & 1 deletion test/integration/server-url-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ getPort().then(function (port) {

test('should allow path in serverUrl', function (t) {
var server = http.createServer(function (req, res) {
t.equal(req.url, '/sub/v2/intake')
t.equal(req.url, '/sub/intake/v2/events')
res.end()
t.end()
server.close()
Expand Down

0 comments on commit 82a1c3a

Please sign in to comment.