Skip to content

Commit

Permalink
Update connect_redis_test.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
shukitchan authored Nov 4, 2024
1 parent aa21c1c commit c0a67ea
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pluginats/connect_redis_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@

_G.ts = { client_request = {}, http = {} }
_G.client = {dbone = {}, dbdefault = {}, selecteddb = 0}
_G.snippet_enabled = true
_G.TS_LUA_REMAP_DID_REMAP = 1

snippet_enabled = true

function ts.client_request.get_url_scheme()
return 'http'
end
Expand Down Expand Up @@ -115,8 +112,6 @@ describe("Unit tests - Lua", function()
client:select(0)
client:sadd("trafficserver-test-2:appsvc1:8080","172.17.0.3#8080#http","172.17.0.5#8080#http")
--require 'pl.pretty'.dump(client)

snippet_enabled = true

stub(ts, "add_package_cpath")
stub(ts, "add_package_path")
Expand Down Expand Up @@ -147,8 +142,9 @@ describe("Unit tests - Lua", function()

--require 'pl.pretty'.dump(client)
require "connect_redis"
snippet_enabled = true
local result = do_global_read_request()
local input_args = {"snippet"}
local result = __init__(input_args)
result = do_global_read_request()

assert.stub(ts.error).was.called_with("Error msg example")
assert.stub(ts.http.skip_remapping_set).was.called_with(0)
Expand Down

0 comments on commit c0a67ea

Please sign in to comment.