Skip to content

Commit

Permalink
Exclude wallarm apifw locations from grpc test
Browse files Browse the repository at this point in the history
  • Loading branch information
134171E committed Dec 26, 2023
1 parent 77e1084 commit afb9259
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/e2e/annotations/grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"
"crypto/tls"
"fmt"
"regexp"
"strings"

pb "github.com/moul/pb/grpcbin/go-grpc"
Expand Down Expand Up @@ -59,6 +60,8 @@ var _ = framework.DescribeAnnotation("backend-protocol - GRPC", func() {

f.WaitForNginxServer(host,
func(server string) bool {
re := regexp.MustCompile(`location.*wallarm-apifw.*{[\S\s]*}\n`)
server = re.ReplaceAllString(server, "")
return strings.Contains(server, "grpc_pass") &&
strings.Contains(server, "grpc_set_header") &&
!strings.Contains(server, "proxy_pass")
Expand Down

0 comments on commit afb9259

Please sign in to comment.