-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AMORO-2778][Helm Chart] Add Tests for Helm Chart #2794
Changes from 5 commits
6867874
41dbc2a
5c41247
6b26ac7
eebe6da
4557086
91c5e2c
04ebbbe
78b9a9a
e8cfa6f
483131e
2945f0a
2773f09
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,5 @@ | |
*.tmproj | ||
.vscode/ | ||
# test files | ||
test-values.yaml | ||
test-values.yaml | ||
tests/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
# 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 ConfigMap | ||
templates: | ||
- amoro-configmap.yaml | ||
chart: | ||
appVersion: 0.1.0 | ||
version: 0.6.0 | ||
tests: | ||
- it: Amoro ConfigMap should override name if set | ||
set: | ||
fullnameOverride: test | ||
asserts: | ||
- containsDocument: | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
name: test | ||
- hasDocuments: | ||
count: 1 | ||
- it: Amoro configMap should reflect jvmOptions | ||
set: | ||
jvmOptions: | ||
xms=8196 | ||
asserts: | ||
- matchRegex: | ||
path: data["jvm.properties"] | ||
pattern: | ||
| | ||
xms=8196 | ||
- it: Amoro configMap should reflect ports | ||
asserts: | ||
- matchRegex: | ||
path: data["config.yaml"] | ||
pattern: | ||
| | ||
bind-port: 1260 | ||
- it: Amoro configMap should reflect database.username if set type to mysql | ||
set: | ||
amoroConf: | ||
database: | ||
type: mysql | ||
username: aaa | ||
asserts: | ||
- matchRegex: | ||
path: data["config.yaml"] | ||
pattern: | ||
| | ||
username: "aaa" | ||
- it: Amoro configMap should reflect terminal iceberg params if set terminal to local | ||
set: | ||
amoroConf: | ||
terminal: | ||
backend: local | ||
icebergHandleTimestampWithoutTimezone: true | ||
asserts: | ||
- matchRegex: | ||
path: data["config.yaml"] | ||
pattern: | ||
| | ||
local.spark.sql.iceberg.handle-timestamp-without-timezone: true | ||
- it: Amoro configMap should show kyuubi url if set terminal to kyuubi | ||
set: | ||
amoroConf: | ||
terminal: | ||
backend: kyuubi | ||
kyuubiJdbcUrl: jdbc:hive2://127.0.0.1:10009/ | ||
asserts: | ||
- matchRegex: | ||
path: data["config.yaml"] | ||
pattern: | ||
| | ||
kyuubi.jdbc.url: "jdbc:hive2://127.0.0.1:10009/" | ||
- it: Amoro configMap should show flink if flink optimizer enabled | ||
set: | ||
optimizer: | ||
flink: | ||
enabled: true | ||
name: flink1 | ||
asserts: | ||
- matchRegex: | ||
path: data["config.yaml"] | ||
pattern: | ||
| | ||
- name: flink1 | ||
- it: Amoro configMap should show spark if spark optimizer enabled | ||
set: | ||
optimizer: | ||
spark: | ||
enabled: true | ||
name: spark1 | ||
asserts: | ||
- matchRegex: | ||
path: data["config.yaml"] | ||
pattern: | ||
| | ||
- name: spark1 | ||
- it: Amoro configMap should show local if local optimizer enabled | ||
set: | ||
optimizer: | ||
local: | ||
enabled: true | ||
name: local1 | ||
asserts: | ||
- matchRegex: | ||
path: data["config.yaml"] | ||
pattern: | ||
| | ||
- name: local1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# 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 Database Secret | ||
templates: | ||
- amoro-database-secret.yaml | ||
chart: | ||
appVersion: 0.1.0 | ||
version: 0.6.0 | ||
tests: | ||
- it: Amoro database secret should not exist when database type set to derby | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when database type is set to derby There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed. |
||
set: | ||
amoroConf: | ||
database: | ||
type: derby | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
- it: Amoro database secret should exist when database type set to mysql | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when database type is set to mysql There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some similar contents in this file can be changed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed. |
||
set: | ||
fullnameOverride: test | ||
amoroConf: | ||
database: | ||
type: mysql | ||
username: "abc" | ||
password: "123" | ||
asserts: | ||
- containsDocument: | ||
kind: Secret | ||
apiVersion: v1 | ||
name: test | ||
- hasDocuments: | ||
count: 1 | ||
- it: Amoro database secret should exist when database type set to postgres | ||
set: | ||
fullnameOverride: test | ||
amoroConf: | ||
database: | ||
type: postgres | ||
username: "abc" | ||
password: "123" | ||
asserts: | ||
- containsDocument: | ||
kind: Secret | ||
apiVersion: v1 | ||
name: test | ||
- hasDocuments: | ||
count: 1 | ||
- it: Amoro database secret should reflect username when database type set to mysql | ||
set: | ||
amoroConf: | ||
database: | ||
type: mysql | ||
username: "abc" | ||
password: "123" | ||
asserts: | ||
- equal: | ||
path: data.username | ||
value: "abc" | ||
decodeBase64: true | ||
- it: Amoro database secret should reflect password when database type set to mysql | ||
set: | ||
amoroConf: | ||
database: | ||
type: mysql | ||
username: "abc" | ||
password: "123" | ||
asserts: | ||
- equal: | ||
path: data.password | ||
value: "123" | ||
decodeBase64: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please let all tests passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.