Skip to content

Commit

Permalink
fix(spec) correct size for datadog fixtur e request
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaultcha committed Jan 7, 2016
1 parent 68161d1 commit a915ff0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/plugins/datadog/log_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe("Datadog Plugin", function()
assert.truthy(res)
assert.equal("kong.logging1_com.request.count:1|c", res)
end)

it("should log to UDP when metrics is status_count", function()
local thread = spec_helper.start_udp_server(UDP_PORT) -- Starting the mock UDP server

Expand All @@ -55,7 +55,7 @@ describe("Datadog Plugin", function()
assert.truthy(res)
assert.equal("kong.logging3_com.request.status.200:1|c", res)
end)

it("should log to UDP when metrics is request_size", function()
local thread = spec_helper.start_udp_server(UDP_PORT) -- Starting the mock UDP server

Expand All @@ -65,9 +65,9 @@ describe("Datadog Plugin", function()
local ok, res = thread:join()
assert.True(ok)
assert.truthy(res)
assert.equal("kong.logging4_com.request.size:111|g", res)
assert.equal("kong.logging4_com.request.size:113|g", res)
end)

it("should log to UDP when metrics is latency", function()
local thread = spec_helper.start_udp_server(UDP_PORT) -- Starting the mock UDP server

Expand All @@ -77,15 +77,15 @@ describe("Datadog Plugin", function()
local ok, res = thread:join()
assert.True(ok)
assert.truthy(res)

local message = {}
for w in string.gmatch(res,"kong.logging2_com.latency:.*|g") do
table.insert(message, w)
end

assert.equal(1, #message)
end)

it("should log to UDP when metrics is request_count", function()
local thread = spec_helper.start_udp_server(UDP_PORT) -- Starting the mock UDP server

Expand Down

0 comments on commit a915ff0

Please sign in to comment.