@@ -560,7 +560,9 @@ func TestAnalyze_nap_app_protect_enable(t *testing.T) {
560
560
tc := tc
561
561
t .Run (name , func (t * testing.T ) {
562
562
t .Parallel ()
563
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
563
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
564
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
565
+ })
564
566
565
567
if ! tc .wantErr && err != nil {
566
568
t .Fatal (err )
@@ -622,7 +624,9 @@ func TestAnalyze_nap_app_protect_security_log_enable(t *testing.T) {
622
624
tc := tc
623
625
t .Run (name , func (t * testing.T ) {
624
626
t .Parallel ()
625
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
627
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
628
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
629
+ })
626
630
627
631
if ! tc .wantErr && err != nil {
628
632
t .Fatal (err )
@@ -675,7 +679,9 @@ func TestAnalyze_nap_app_protect_security_log(t *testing.T) {
675
679
tc := tc
676
680
t .Run (name , func (t * testing.T ) {
677
681
t .Parallel ()
678
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
682
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
683
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
684
+ })
679
685
680
686
if ! tc .wantErr && err != nil {
681
687
t .Fatal (err )
@@ -728,7 +734,9 @@ func TestAnalyze_nap_app_protect_policy_file(t *testing.T) {
728
734
tc := tc
729
735
t .Run (name , func (t * testing.T ) {
730
736
t .Parallel ()
731
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
737
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
738
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
739
+ })
732
740
733
741
if ! tc .wantErr && err != nil {
734
742
t .Fatal (err )
@@ -790,7 +798,9 @@ func TestAnalyze_nap_app_protect_physical_memory_util_thresholds(t *testing.T) {
790
798
tc := tc
791
799
t .Run (name , func (t * testing.T ) {
792
800
t .Parallel ()
793
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
801
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
802
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
803
+ })
794
804
795
805
if ! tc .wantErr && err != nil {
796
806
t .Fatal (err )
@@ -852,7 +862,9 @@ func TestAnalyze_nap_app_protect_cpu_thresholds(t *testing.T) {
852
862
tc := tc
853
863
t .Run (name , func (t * testing.T ) {
854
864
t .Parallel ()
855
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
865
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
866
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
867
+ })
856
868
857
869
if ! tc .wantErr && err != nil {
858
870
t .Fatal (err )
@@ -914,7 +926,9 @@ func TestAnalyze_nap_app_protect_failure_mode_action(t *testing.T) {
914
926
tc := tc
915
927
t .Run (name , func (t * testing.T ) {
916
928
t .Parallel ()
917
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
929
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
930
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
931
+ })
918
932
919
933
if ! tc .wantErr && err != nil {
920
934
t .Fatal (err )
@@ -976,7 +990,9 @@ func TestAnalyze_nap_app_protect_cookie_seed(t *testing.T) {
976
990
tc := tc
977
991
t .Run (name , func (t * testing.T ) {
978
992
t .Parallel ()
979
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
993
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
994
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
995
+ })
980
996
981
997
if ! tc .wantErr && err != nil {
982
998
t .Fatal (err )
@@ -1038,7 +1054,9 @@ func TestAnalyze_nap_app_protect_compressed_requests_action(t *testing.T) {
1038
1054
tc := tc
1039
1055
t .Run (name , func (t * testing.T ) {
1040
1056
t .Parallel ()
1041
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
1057
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
1058
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
1059
+ })
1042
1060
1043
1061
if ! tc .wantErr && err != nil {
1044
1062
t .Fatal (err )
@@ -1100,7 +1118,9 @@ func TestAnalyze_nap_app_protect_request_buffer_overflow_action(t *testing.T) {
1100
1118
tc := tc
1101
1119
t .Run (name , func (t * testing.T ) {
1102
1120
t .Parallel ()
1103
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
1121
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
1122
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
1123
+ })
1104
1124
1105
1125
if ! tc .wantErr && err != nil {
1106
1126
t .Fatal (err )
@@ -1162,7 +1182,9 @@ func TestAnalyze_nap_app_protect_user_defined_signatures(t *testing.T) {
1162
1182
tc := tc
1163
1183
t .Run (name , func (t * testing.T ) {
1164
1184
t .Parallel ()
1165
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
1185
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
1186
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
1187
+ })
1166
1188
1167
1189
if ! tc .wantErr && err != nil {
1168
1190
t .Fatal (err )
@@ -1224,7 +1246,9 @@ func TestAnalyze_nap_app_protect_reconnect_period_seconds(t *testing.T) {
1224
1246
tc := tc
1225
1247
t .Run (name , func (t * testing.T ) {
1226
1248
t .Parallel ()
1227
- err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {})
1249
+ err := analyze ("nginx.conf" , tc .stmt , ";" , tc .ctx , & ParseOptions {
1250
+ MatchFuncs : []MatchFunc {MatchAppProtectWAFv4 },
1251
+ })
1228
1252
1229
1253
if ! tc .wantErr && err != nil {
1230
1254
t .Fatal (err )
0 commit comments