File tree 3 files changed +25
-1
lines changed
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ func main() {
75
75
76
76
## Contributing
77
77
78
- If you'd like to contribute to the project, please read our [ Contributing guide] ( docs/ CONTRIBUTING.md) .
78
+ If you'd like to contribute to the project, please read our [ Contributing guide] ( CONTRIBUTING.md ) .
79
79
80
80
## License
81
81
Original file line number Diff line number Diff line change @@ -35,6 +35,9 @@ var mapBodies = map[string]mapParameterMasks{
35
35
"types" : {
36
36
defaultMasks : ngxConf1More ,
37
37
},
38
+ "split_clients" : {
39
+ defaultMasks : ngxConfTake1 ,
40
+ },
38
41
}
39
42
40
43
// analyzeMapBody validates the body of a map-like directive. Map-like directives are block directives
Original file line number Diff line number Diff line change @@ -144,6 +144,27 @@ func TestAnalyzeMapBody(t *testing.T) {
144
144
term : ";" ,
145
145
wantErr : & ParseError {What : "invalid number of parameters" },
146
146
},
147
+ "valid split_clients" : {
148
+ mapDirective : "split_clients" ,
149
+ parameter : & Directive {
150
+ Directive : "0.5%" ,
151
+ Args : []string {"google.com" },
152
+ Line : 5 ,
153
+ Block : Directives {},
154
+ },
155
+ term : ";" ,
156
+ },
157
+ "invalid split_clients" : {
158
+ mapDirective : "split_clients" ,
159
+ parameter : & Directive {
160
+ Directive : "0.5%" ,
161
+ Args : []string {"google.com" , "testme" },
162
+ Line : 5 ,
163
+ Block : Directives {},
164
+ },
165
+ term : ";" ,
166
+ wantErr : & ParseError {What : "invalid number of parameters" },
167
+ },
147
168
"missing semicolon" : {
148
169
mapDirective : "map" ,
149
170
parameter : & Directive {
You can’t perform that action at this time.
0 commit comments