@@ -2695,7 +2695,7 @@ func TestAnalyze_geoip2(t *testing.T) {
2695
2695
},
2696
2696
},
2697
2697
},
2698
- blockCtx {"http" , "stream" },
2698
+ blockCtx {"http" },
2699
2699
false ,
2700
2700
},
2701
2701
@@ -2782,7 +2782,11 @@ func TestAnalyze_geoip2(t *testing.T) {
2782
2782
tc := tc
2783
2783
t .Run (name , func (t * testing.T ) {
2784
2784
t .Parallel ()
2785
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
2785
+ terminator := ";"
2786
+ if tc .stmt .Directive == "geoip2" {
2787
+ terminator = "{"
2788
+ }
2789
+ err := analyze ("nginx.conf" , tc .stmt , terminator , tc .ctx , & ParseOptions {
2786
2790
DirectiveSources : []MatchFunc {MatchNginxPlusLatest , MatchGeoip2Latest },
2787
2791
})
2788
2792
@@ -2897,7 +2901,11 @@ func TestAnalyze_oidc(t *testing.T) {
2897
2901
tc := tc
2898
2902
t .Run (name , func (t * testing.T ) {
2899
2903
t .Parallel ()
2900
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
2904
+ terminator := ";"
2905
+ if tc .stmt .Directive == "oidc_provider" {
2906
+ terminator = "{"
2907
+ }
2908
+ err := analyze ("nginx.conf" , tc .stmt , terminator , tc .ctx , & ParseOptions {
2901
2909
DirectiveSources : []MatchFunc {MatchNginxPlusR34 },
2902
2910
})
2903
2911
0 commit comments