-
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6867874
[AMORO-2778] add Tests for Helm Charts
lianneli 41dbc2a
Add Tests for Helm Chart Templates
lianneli 5c41247
Merge branch 'master-fixIssue2778' of github.com:lianneli/amoro into …
lianneli 6b26ac7
[AMORO-2778] add Tests for Helm Charts With Lisence
lianneli eebe6da
Merge branch 'master' into master-fixIssue2778
baiyangtx 4557086
[AMORO-2778][helm chart] fix syntax errors on test names, and add a w…
lianneli 91c5e2c
Merge branch 'apache:master' into master-fixIssue2778
lianneli 04ebbbe
Merge remote-tracking branch 'origin/master-fixIssue2778' into master…
lianneli 78b9a9a
[AMORO2778] debug workflow
lianneli e8cfa6f
[AMORO2778] debug workflow
lianneli 483131e
Update .github/workflows/pull-request-on-helmchat.yml
lianneli 2945f0a
Update and rename pull-request-on-helmchat.yml to helm-charts-ci.yml
lianneli 2773f09
Merge branch 'master' into master-fixIssue2778
lianneli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
|
||
# This workflow will execute Tests when submit a PR. | ||
|
||
name: "CI for Helm Charts" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'charts/**' | ||
push: | ||
paths: | ||
- 'charts/**' | ||
merge_group: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Helm | ||
uses: azure/setup-helm@v4 | ||
|
||
- name: Install helm-unittests | ||
run: | | ||
helm plugin install https://github.com/helm-unittest/helm-unittest.git | ||
|
||
- name: Rebuild Chart with Dependency | ||
run: | | ||
cd charts/amoro | ||
helm dependency build | ||
|
||
- name: Run Unit Tests | ||
run: | | ||
helm unittest charts/amoro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 type is set 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 terminal.backend is set 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 terminal.backend is set 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 is set true | ||
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 is set true | ||
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 is set true | ||
set: | ||
optimizer: | ||
local: | ||
enabled: true | ||
name: local1 | ||
asserts: | ||
- matchRegex: | ||
path: data["config.yaml"] | ||
pattern: | ||
| | ||
- name: local1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 if database type is set to derby | ||
set: | ||
amoroConf: | ||
database: | ||
type: derby | ||
asserts: | ||
- hasDocuments: | ||
count: 0 | ||
- it: Amoro database secret should exist if database type is set to mysql | ||
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 if database type is 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 if database type is 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 if database type is set to mysql | ||
set: | ||
amoroConf: | ||
database: | ||
type: mysql | ||
username: "abc" | ||
password: "123" | ||
asserts: | ||
- equal: | ||
path: data.password | ||
value: "123" | ||
decodeBase64: true |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.