MonkeyCanCode commented on code in PR #984:
URL: https://github.com/apache/polaris/pull/984#discussion_r1959081159


##########
helm/polaris/tests/service_test.yaml:
##########
@@ -155,8 +153,87 @@ tests:
             - port: 28181
               targetPort: 28181
               name: polaris-http2
-              nodePort: 28181
               protocol: UDP
+  # node port
+  - it: should set nodeport only when service type is NodePort
+    set:
+      service:
+        type: NodePort
+        ports:
+          - port: 18181
+            targetPort: 18181
+            nodePort: 30081
+            name: polaris-http
+    asserts:
+      - equal: spec.type

Review Comment:
   Change to following:
   ```
         - equal:
             path: spec.type
             value: NodePort
   ```



##########
helm/polaris/tests/service_test.yaml:
##########
@@ -155,8 +153,87 @@ tests:
             - port: 28181
               targetPort: 28181
               name: polaris-http2
-              nodePort: 28181
               protocol: UDP
+  # node port
+  - it: should set nodeport only when service type is NodePort
+    set:
+      service:
+        type: NodePort
+        ports:
+          - port: 18181
+            targetPort: 18181
+            nodePort: 30081
+            name: polaris-http
+    asserts:
+      - equal: spec.type
+        value: NodePort
+      - equal:
+          path: spec.ports
+          value:
+            - port: 18181
+              targetPort: 18181
+              protocol: TCP
+              name: polaris-http
+              nodePort: 30081
+  - it: should not set nodeport type is NodePort and nodePort value is empty
+    set:
+      service:
+        type: NodePort
+        ports:
+          - port: 18181
+            targetPort: 18181
+            name: polaris-http
+    asserts:
+      - equal: spec.type

Review Comment:
         - equal:
             path: spec.type
             value: NodePort



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to