Skip to content

Commit

Permalink
Add Test Case for Protocol Forced to HTTP in buildListenerCreateOpt (k…
Browse files Browse the repository at this point in the history
  • Loading branch information
FavourEva authored Nov 8, 2023
1 parent 95a3823 commit 2b17004
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pkg/openstack/loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2385,6 +2385,27 @@ func TestBuildListenerCreateOpt(t *testing.T) {
Tags: nil,
},
},
{
name: "Test with Protocol forced to HTTP",
port: corev1.ServicePort{
Protocol: "TCP",
Port: 80,
},
svcConf: &serviceConfig{
connLimit: 100,
lbName: "my-lb",
keepClientIP: true,
tlsContainerRef: "",
},
expectedCreateOpt: listeners.CreateOpts{
Name: "Test with Protocol forced to HTTP",
Protocol: listeners.ProtocolHTTP,
ProtocolPort: 80,
ConnLimit: &svcConf.connLimit,
InsertHeaders: map[string]string{"X-Forwarded-For": "true"},
Tags: nil,
},
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 2b17004

Please sign in to comment.