-
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
Conversation
@baiyangtx Could you please help to review? |
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.
This PR is valuable, and now that we already have unittest, why not add it to the workflow? Would you be interested in completing this part in this PR?
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.
LGTM, I leave some comments.
|
||
Helm Chart for Amoro supports Unit Tests by [helm-unittest](https://github.com/helm-unittest/helm-unittest). Before | ||
submitting PRs, please let all the 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.
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.
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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
asserts: | ||
- notExists: | ||
path: metadata.annotations | ||
- it: Amoro Ingress should not contains ingress className if not set |
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.
Amoro Ingress should not contain ingress className if not set.
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.
contains -> contain
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.
documentSelector: | ||
path: metadata.name | ||
value: test-table | ||
- it: Amoro Service for table should reflect Node port of set type to NodePort |
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.
type is set to NodePort
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.
…orkflow to run unittest when aubmit pr
Thanks for your advice. I have add a workflow to run unit tests when change helm chart files. Could you help to check if it is proper? |
# This workflow will execute Tests when submit a PR. | ||
|
||
name: "Pull Request Test For Helm Charts" | ||
|
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.
Add this
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: 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.
fixed.
Co-authored-by: baiyangtx <xiangnebula@163.com>
Thanks again. I have accepted all the suggestions. Is there another one? |
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.
LGTM, thanks for your contributions.
Why are the changes needed?
Fix #2778
Brief change log
app.kubernetes.io/name: amoro-database-secret
in "charts/amoro/templates/amoro-database-secert.yaml"How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before making a pull request
Documentation