File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -2262,6 +2262,10 @@ var directives = map[string][]uint{
2262
2262
ngxHTTPMainConf | ngxHTTPSrvConf | ngxHTTPLocConf | ngxConfTake2 ,
2263
2263
ngxStreamMainConf | ngxStreamSrvConf | ngxConfTake2 ,
2264
2264
},
2265
+ "js_shared_dict_zone" : {
2266
+ ngxHTTPMainConf | ngxConf1More ,
2267
+ ngxStreamMainConf | ngxConf1More ,
2268
+ },
2265
2269
"js_var" : {
2266
2270
ngxHTTPMainConf | ngxHTTPSrvConf | ngxHTTPLocConf | ngxConfTake12 ,
2267
2271
ngxStreamMainConf | ngxStreamSrvConf | ngxConfTake12 ,
Original file line number Diff line number Diff line change @@ -261,6 +261,33 @@ func TestAnalyze_njs(t *testing.T) {
261
261
blockCtx {"stream" },
262
262
true ,
263
263
},
264
+ "js_shared_dict_zone in http context ok" : {
265
+ & Directive {
266
+ Directive : "js_shared_dict_zone" ,
267
+ Args : []string {"zone=foo:1M" },
268
+ Line : 5 ,
269
+ },
270
+ blockCtx {"http" },
271
+ false ,
272
+ },
273
+ "js_shared_dict_zone in stream context ok" : {
274
+ & Directive {
275
+ Directive : "js_shared_dict_zone" ,
276
+ Args : []string {"zone=foo:1M" },
277
+ Line : 5 ,
278
+ },
279
+ blockCtx {"stream" },
280
+ false ,
281
+ },
282
+ "js_shared_dict_zone not ok" : {
283
+ & Directive {
284
+ Directive : "js_shared_dict_zone" ,
285
+ Args : []string {"zone=foo:1M" },
286
+ Line : 5 ,
287
+ },
288
+ blockCtx {"http" , "location" },
289
+ true ,
290
+ },
264
291
}
265
292
266
293
for name , tc := range testcases {
You can’t perform that action at this time.
0 commit comments