diff --git a/pluginats/connect_redis_test.lua b/pluginats/connect_redis_test.lua index f02a087..f785486 100644 --- a/pluginats/connect_redis_test.lua +++ b/pluginats/connect_redis_test.lua @@ -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 @@ -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") @@ -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)