lianneli commented on code in PR #2794: URL: https://github.com/apache/amoro/pull/2794#discussion_r1584351155
########## charts/amoro/tests/amoro-service_test.yaml: ########## @@ -0,0 +1,265 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +suite: Test Amoro Service +templates: + - amoro-service.yaml +chart: + appVersion: 0.1.0 + version: 0.6.0 +tests: + - it: Amoro Service should contains 3 service by default value + asserts: + - hasDocuments: + count: 3 + - it: Amoro Service should count 2 when rest service enabled to false + set: + server: + rest: + enabled: false + asserts: + - hasDocuments: + count: 2 + - it: Amoro Service should count 1 when rest and table service enabled to false + set: + server: + rest: + enabled: false + table: + enabled: false + asserts: + - hasDocuments: + count: 1 + - it: Amoro Service should count 0 when all the service enabled to false + set: + server: + rest: + enabled: false + table: + enabled: false + optimizing: + enabled: false + asserts: + - hasDocuments: + count: 0 + - it: Amoro Service for rest should contains service annotations if set + set: + fullnameOverride: test + server: + rest: + service: + annotations: + ANNOTATION: ANNOTATION_V2 + asserts: + - exists: + path: metadata.annotations + documentSelector: + path: metadata.name + value: test-rest + - isSubset: + path: metadata.annotations + content: + ANNOTATION: ANNOTATION_V2 + documentSelector: + path: metadata.name + value: test-rest + - it: Amoro Service for table should contains service annotations if set + set: + fullnameOverride: test + server: + table: + service: + annotations: + ANNOTATION: ANNOTATION_V3 + asserts: + - exists: + path: metadata.annotations + documentSelector: + path: metadata.name + value: test-table + - isSubset: + path: metadata.annotations + content: + ANNOTATION: ANNOTATION_V3 + documentSelector: + path: metadata.name + value: test-table + - it: Amoro Service for optimizing should contains service annotations if set + set: + fullnameOverride: test + server: + optimizing: + service: + annotations: + ANNOTATION: ANNOTATION_V4 + asserts: + - exists: + path: metadata.annotations + documentSelector: + path: metadata.name + value: test-optimizing + - isSubset: + path: metadata.annotations + content: + ANNOTATION: ANNOTATION_V4 + documentSelector: + path: metadata.name + value: test-optimizing + - it: Amoro Service for rest should reflect ports + set: + fullnameOverride: test + server: + rest: + service: + port: "1234" + asserts: + - equal: + path: spec.type + value: ClusterIP + documentSelector: + path: metadata.name + value: test-rest + - contains: + path: spec.ports + content: + name: rest + port: 1234 + targetPort: 1630 + documentSelector: + path: metadata.name + value: test-rest + - it: Amoro Service for rest should reflect Node port of set type to NodePort + set: + fullnameOverride: test + server: + rest: + service: + type: "NodePort" + nodePort: "1234" + asserts: + - equal: + path: spec.type + value: NodePort + documentSelector: + path: metadata.name + value: test-rest + - contains: + path: spec.ports + content: + name: rest + nodePort: 1234 + port: 1630 + targetPort: 1630 + documentSelector: + path: metadata.name + value: test-rest + - it: Amoro Service for table should reflect ports + set: + fullnameOverride: test + server: + table: + service: + port: "1234" + asserts: + - equal: + path: spec.type + value: ClusterIP + documentSelector: + path: metadata.name + value: test-table + - contains: + path: spec.ports + content: + name: table + port: 1234 + targetPort: 1260 + documentSelector: + path: metadata.name + value: test-table + - it: Amoro Service for table should reflect Node port of set type to NodePort Review Comment: fixed. -- 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]
