From 677f0bae39e51d5967b11d28c819889bffe2c21d Mon Sep 17 00:00:00 2001 From: HaoJie Liu Date: Wed, 20 Jul 2022 11:19:18 +0800 Subject: [PATCH] use exist const to replace TCP str Signed-off-by: HaoJie Liu --- test/e2e/apimachinery/aggregator.go | 2 +- test/e2e/apimachinery/crd_conversion_webhook.go | 2 +- test/e2e/apimachinery/webhook.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/apimachinery/aggregator.go b/test/e2e/apimachinery/aggregator.go index a88253d0733..623da3e0b47 100644 --- a/test/e2e/apimachinery/aggregator.go +++ b/test/e2e/apimachinery/aggregator.go @@ -409,7 +409,7 @@ func TestSampleAPIServer(f *framework.Framework, aggrclient *aggregatorclient.Cl Selector: serviceLabels, Ports: []v1.ServicePort{ { - Protocol: "TCP", + Protocol: v1.ProtocolTCP, Port: aggregatorServicePort, TargetPort: intstr.FromInt(443), }, diff --git a/test/e2e/apimachinery/crd_conversion_webhook.go b/test/e2e/apimachinery/crd_conversion_webhook.go index 624c0125a0d..c69569103bc 100644 --- a/test/e2e/apimachinery/crd_conversion_webhook.go +++ b/test/e2e/apimachinery/crd_conversion_webhook.go @@ -340,7 +340,7 @@ func deployCustomResourceWebhookAndService(f *framework.Framework, image string, Selector: serviceLabels, Ports: []v1.ServicePort{ { - Protocol: "TCP", + Protocol: v1.ProtocolTCP, Port: servicePort, TargetPort: intstr.FromInt(int(containerPort)), }, diff --git a/test/e2e/apimachinery/webhook.go b/test/e2e/apimachinery/webhook.go index d43b7199c5d..87e0fbbf9ef 100644 --- a/test/e2e/apimachinery/webhook.go +++ b/test/e2e/apimachinery/webhook.go @@ -838,7 +838,7 @@ func deployWebhookAndService(f *framework.Framework, image string, certCtx *cert Selector: serviceLabels, Ports: []v1.ServicePort{ { - Protocol: "TCP", + Protocol: v1.ProtocolTCP, Port: servicePort, TargetPort: intstr.FromInt(int(containerPort)), },