Skip to content

Commit

Permalink
fix(acme) fix typo in tests (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
fffonion authored Dec 16, 2019
1 parent 8c466c5 commit b9b8465
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/02-kong_storage_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,23 @@ for _, strategy in helpers.each_strategy() do
err = a:set(key, "setttl", 1)
assert.is_nil(err)

v, err = a:get(key, "setttl")
v, err = a:get(key)
assert.is_nil(err)
assert.same("setttl", v)
end)

it("cleans up expired key", function()
ngx.sleep(1)

v, err = a:get(key, "setttl")
v, err = a:get(key)
assert.is_nil(err)
assert.is_nil(v)
end)
end)

describe("add with ttl", function()
describe("add without ttl", function()
ngx.update_time()
local key = tostring(ngx.now()) .. "addttl"
local key = tostring(ngx.now()) .. "add"
local a = storage.new()
local err, v
it("returns no error", function()
Expand Down Expand Up @@ -142,15 +142,15 @@ for _, strategy in helpers.each_strategy() do
err = a:add(key, "addttl", 1)
assert.is_nil(err)

v, err = a:get(key, "addttl")
v, err = a:get(key)
assert.is_nil(err)
assert.same("addttl", v)
end)

it("cleans up expired key", function()
ngx.sleep(1)

v, err = a:get(key, "addttl")
v, err = a:get(key)
assert.is_nil(err)
assert.is_nil(v)
end)
Expand Down

0 comments on commit b9b8465

Please sign in to comment.