@@ -2695,7 +2695,7 @@ func TestAnalyze_geoip2(t *testing.T) {
26952695 },
26962696 },
26972697 },
2698- blockCtx {"http" , "stream" },
2698+ blockCtx {"http" },
26992699 false ,
27002700 },
27012701
@@ -2782,7 +2782,11 @@ func TestAnalyze_geoip2(t *testing.T) {
27822782 tc := tc
27832783 t .Run (name , func (t * testing.T ) {
27842784 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 {
27862790 DirectiveSources : []MatchFunc {MatchNginxPlusLatest , MatchGeoip2Latest },
27872791 })
27882792
@@ -2897,7 +2901,11 @@ func TestAnalyze_oidc(t *testing.T) {
28972901 tc := tc
28982902 t .Run (name , func (t * testing.T ) {
28992903 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 {
29012909 DirectiveSources : []MatchFunc {MatchNginxPlusR34 },
29022910 })
29032911
0 commit comments