Skip to content

Commit 44eed0d

Browse files
committed
fix: typo in redis-commands eval
1 parent 39de3d8 commit 44eed0d

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

t/redis-commands.t

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,22 @@
22

33
use Test::Nginx::Socket::Lua::Stream 'no_plan';
44

5+
use Cwd qw(cwd);
6+
7+
8+
my $pwd = cwd();
9+
10+
our $StreamConfig = qq{
11+
lua_package_path "$pwd/lib/?.lua;$pwd/lib/?/init.lua;;";
12+
lua_shared_dict dogs 1m;
13+
};
14+
515
no_shuffle();
616
run_tests();
717

818
__DATA__
919
=== TEST 1: Redis commands KEYS
10-
--- stream_config
11-
lua_shared_dict dogs 1m;
20+
--- stream_config eval: $::StreamConfig
1221
--- stream_server_config
1322
content_by_lua_block {
1423
ngx.shared.dogs:set("doge1", "wow")
@@ -51,8 +60,7 @@ doge1\r
5160
[error]
5261
5362
=== TEST 2: Redis commands EVAL keys and argv
54-
--- stream_config
55-
lua_shared_dict dogs 1m;
63+
--- stream_config eval: $::StreamConfig
5664
--- stream_server_config
5765
content_by_lua_block {
5866
ngx.shared.dogs:set("doge", "wow")
@@ -121,8 +129,7 @@ quit\r
121129
122130
123131
=== TEST 3: Redis commands EVAL shdict.call no error
124-
--- stream_config
125-
lua_shared_dict dogs 1m;
132+
--- stream_config eval: $::StreamConfig
126133
--- stream_server_config
127134
content_by_lua_block {
128135
ngx.shared.dogs:set("doge", "wow")
@@ -174,8 +181,7 @@ quit\r
174181
175182
176183
=== TEST 4: Redis commands EVAL shdict.call and shdict.pcall error handling
177-
--- stream_config
178-
lua_shared_dict dogs 1m;
184+
--- stream_config eval: $::StreamConfig
179185
--- stream_server_config
180186
content_by_lua_block {
181187
ngx.shared.dogs:set("doge", "wow")

0 commit comments

Comments
 (0)