Skip to content

Commit 91d7d47

Browse files
committed
Test passing all config options does not error
1 parent 71922d2 commit 91d7d47

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

t/config.t

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,30 @@ location /t {
101101

102102
assert(rc == nil, "rc should be nil")
103103
assert(err == "field foo does not exist", "err should contain error")
104+
105+
106+
-- Provide all options, without errors
107+
108+
assert(require("resty.redis.connector").new({
109+
connect_timeout = 100,
110+
read_timeout = 1000,
111+
connection_options = {},
112+
keepalive_timeout = 60000,
113+
keepalive_poolsize = 30,
114+
115+
host = "127.0.0.1",
116+
port = 6379,
117+
path = "", -- /tmp/redis.sock
118+
password = "",
119+
db = 0,
120+
121+
url = "", -- DSN url
122+
123+
master_name = "mymaster",
124+
role = "master", -- master | slave | any
125+
sentinels = {},
126+
}), "new should return positively")
127+
104128
}
105129
}
106130
--- request

0 commit comments

Comments
 (0)