Skip to content

Commit 4c80dd1

Browse files
authored
fix:typo (#47)
* fix:typo * fix: test case
1 parent f675e96 commit 4c80dd1

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lib/resty/etcd/v2.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ local function _request(self, method, uri, opts, timeout)
193193
return nil, "invalid response code: " .. res.status
194194
end
195195

196-
if res.stats == 401 then
196+
if res.status == 401 then
197197
return nil, "insufficient credentials code: " .. res.status
198198
end
199199

lib/resty/etcd/v3.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ local function delete(self, key, attr)
401401

402402
local range_end
403403
if attr.range_end then
404-
range_end = encode_base64(attr.range_endrange_end)
404+
range_end = encode_base64(attr.range_end)
405405
end
406406

407407
local prev_kv

t/v2/cluster.t

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,4 @@ GET /t
134134
[error]
135135
--- response_body
136136
checked error msg as expect: Key not found
137-
checked error msg as expect: The request requires user authentication
138-
all done
137+
err: insufficient credentials code: 401

0 commit comments

Comments
 (0)