@@ -97,8 +97,38 @@ var _ = Describe("Storage controller medium tests", func() {
9797 },
9898 })
9999
100+ storageSample .Spec .Service .GRPC .AdditionalPort = 2136
101+
100102 Expect (k8sClient .Create (ctx , storageSample )).Should (Succeed ())
101103
104+ By ("Check grpc service has an additional port..." , func () {
105+ var svc corev1.Service
106+ serviceName := fmt .Sprintf ("%v-grpc" , testobjects .StorageName )
107+ Eventually (func () bool {
108+ err := k8sClient .Get (ctx ,
109+ client.ObjectKey {
110+ Name : serviceName ,
111+ Namespace : testobjects .YdbNamespace ,
112+ },
113+ & svc ,
114+ )
115+ if err != nil {
116+ return false
117+ }
118+ return true
119+ }, test .Timeout , test .Interval ).Should (BeTrue (),
120+ "Service %s/%s should eventually exist" , testobjects .YdbNamespace , serviceName ,
121+ )
122+
123+ ports := svc .Spec .Ports
124+ Expect (len (ports )).To (Equal (2 ), "expected 2 ports but got %d" , len (ports ))
125+ Expect (ports [0 ].Port ).To (Equal (int32 (2135 )))
126+ Expect (ports [0 ].Name ).To (Equal (v1alpha1 .GRPCServicePortName ))
127+ Expect (ports [1 ].Port ).To (Equal (int32 (2136 )))
128+ Expect (ports [1 ].Name ).To (Equal (v1alpha1 .GRPCServiceAdditionalPortName ))
129+ Expect (ports [1 ].TargetPort .IntVal ).To (Equal (int32 (2136 )))
130+ })
131+
102132 By ("Check volume has been propagated to pods..." )
103133 storageStatefulSets := appsv1.StatefulSetList {}
104134 Eventually (func () bool {
0 commit comments