-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add test cases for validation.yaml and services yaml files (#50)
* chore: bump risingwave to v1.7.1 and release Signed-off-by: arkbriar <[email protected]> * test: add test cases for validation.yaml Signed-off-by: arkbriar <[email protected]> * Fix CI Signed-off-by: arkbriar <[email protected]> --------- Signed-off-by: arkbriar <[email protected]>
- Loading branch information
Showing
9 changed files
with
1,016 additions
and
49 deletions.
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
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 |
---|---|---|
@@ -1,16 +1,40 @@ | ||
HELM_CHARTS=$(shell ls charts) | ||
#INCUBATING_HELM_CHARTS=$(shell ls incubating/charts) | ||
|
||
helm-dependency-update: | ||
@$(foreach chart,$(HELM_CHARTS),helm dependency update charts/$(chart);) | ||
|
||
lint: | ||
# for each in $(HELM_CHARTS) and $(INCUBATING_HELM_CHARTS), do helm lint | ||
$(foreach chart,$(HELM_CHARTS),helm lint charts/$(chart);) | ||
# for each in $(HELM_CHARTS), do helm lint | ||
@$(foreach chart,$(HELM_CHARTS),helm lint --strict --set tags.bundle=true charts/$(chart);) | ||
#$(foreach chart,$(INCUBATING_HELM_CHARTS),helm lint incubating/charts/$(chart);) | ||
|
||
test: | ||
$(foreach chart,$(HELM_CHARTS),helm unittest --strict -f 'tests/**/*_test.yaml' charts/$(chart);) | ||
# for each in $(HELM_CHARTS), do helm unittest | ||
@$(foreach chart,$(HELM_CHARTS),helm unittest --strict -f 'tests/**/*_test.yaml' charts/$(chart);) | ||
|
||
define test-uncommitted-for-chart | ||
$(eval uncommitted_files := $(shell git diff --name-only head -- charts/$(1)/tests | sed -e "s/charts\/$(1)\///g")) | ||
if [ "$(uncommitted_files)" != "" ]; then \ | ||
helm unittest --strict $(addprefix -f ,$(uncommitted_files)) charts/$(1); \ | ||
fi | ||
endef | ||
|
||
.PHONY: test-uncommitted | ||
test-uncommitted: $(UNCOMMITTED_TEST_FILES) | ||
@$(foreach chart,$(HELM_CHARTS),$(call test-uncommitted-for-chart,$(chart))) | ||
|
||
sync-crds: | ||
./scripts/sync-crds.sh charts/risingwave-operator/crds | ||
|
||
sanitize: | ||
@./scripts/sanitize.sh | ||
|
||
# A literal space. | ||
space := | ||
space += | ||
|
||
# Joins elements of the list in arg 2 with the given separator. | ||
# 1. Element separator. | ||
# 2. The list. | ||
join-with = $(subst $(space),$1,$(strip $2)) | ||
strip-prefix = $(subst $2,,$1) |
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
Oops, something went wrong.