Skip to content

Commit

Permalink
touchup
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjumani committed Mar 7, 2025
1 parent 6a21eaa commit e92a03d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/gomega/matchers/have_protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const (
HTTP2Protocol = "HTTP/2"
)

// HaveProtocol expects a http response with the given protocol
// HaveProtocol expects an http response with the given protocol
func HaveProtocol(protocol string) types.GomegaMatcher {
if protocol == "" {
// If no keys are defined, we create a matcher that always succeeds
Expand All @@ -23,12 +23,12 @@ func HaveProtocol(protocol string) types.GomegaMatcher {
return gomega.WithTransform(transforms.WithProtocol(), gomega.Equal(protocol))
}

// HaveHTTP1Protocol expects a http response with the HTTP/1.1 protocol
// HaveHTTP1Protocol expects an http response with the HTTP/1.1 protocol
func HaveHTTP1Protocol() types.GomegaMatcher {
return HaveProtocol(HTTP1Protocol)
}

// HaveHTTP2Protocol expects a http response with the HTTP/2 protocol
// HaveHTTP2Protocol expects an http response with the HTTP/2 protocol
func HaveHTTP2Protocol() types.GomegaMatcher {
return HaveProtocol(HTTP2Protocol)
}
3 changes: 2 additions & 1 deletion test/kubernetes/e2e/features/services/httproute/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"net/http"
"path/filepath"

"github.com/solo-io/gloo/test/gomega/matchers"
testmatchers "github.com/solo-io/gloo/test/gomega/matchers"
"github.com/solo-io/gloo/test/kubernetes/e2e/tests/base"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down Expand Up @@ -37,7 +38,7 @@ var (

expectedHTTP2SvcResp = &testmatchers.HttpResponse{
StatusCode: http.StatusOK,
Protocol: "HTTP/2",
Protocol: matchers.HTTP2Protocol,
}

// test cases
Expand Down

0 comments on commit e92a03d

Please sign in to comment.