Skip to content

Commit

Permalink
fix:typo (#47)
Browse files Browse the repository at this point in the history
* fix:typo

* fix: test case
  • Loading branch information
nic-chen authored Nov 22, 2019
1 parent f675e96 commit 4c80dd1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/resty/etcd/v2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ local function _request(self, method, uri, opts, timeout)
return nil, "invalid response code: " .. res.status
end

if res.stats == 401 then
if res.status == 401 then
return nil, "insufficient credentials code: " .. res.status
end

Expand Down
2 changes: 1 addition & 1 deletion lib/resty/etcd/v3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ local function delete(self, key, attr)

local range_end
if attr.range_end then
range_end = encode_base64(attr.range_endrange_end)
range_end = encode_base64(attr.range_end)
end

local prev_kv
Expand Down
3 changes: 1 addition & 2 deletions t/v2/cluster.t
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,4 @@ GET /t
[error]
--- response_body
checked error msg as expect: Key not found
checked error msg as expect: The request requires user authentication
all done
err: insufficient credentials code: 401

0 comments on commit 4c80dd1

Please sign in to comment.