fix: filter out repo update messages in lint test

Update test runner to filter out repo update messages that are
now generated by the single helm.UpdateRepo() call, keeping
the expected lint output consistent with the original behavior.

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2026-01-24 08:36:51 +08:00
parent fb9ee4479d
commit db2f0fee9b
3 changed files with 5 additions and 19 deletions

View File

@ -35,7 +35,7 @@ for i in $(seq 10); do
info "Comparing lint/chart-needs #$i"
# Remove azuredisk-csi-driver repo to ensure consistent output (repo addition message)
${helm} repo remove azuredisk-csi-driver &>/dev/null || true
${helmfile} -f ${chart_need_case_input_dir}/${config_file} lint --include-needs | grep -v Linting | grep -v "has been removed" | grep -Ev "(Warning:.*is not a valid SemVerV2|\[WARNING\].*is not a valid SemVerV2|failed to load plugins)" > ${chart_needs_lint_reverse} || fail "\"helmfile lint\" shouldn't fail"
${helmfile} -f ${chart_need_case_input_dir}/${config_file} lint --include-needs | grep -v Linting | grep -v "has been removed" | grep -Ev "(Updating repo|Hang tight while we grab|Update Complete|Successfully got an update from|Warning:.*is not a valid SemVerV2|\[WARNING\].*is not a valid SemVerV2|failed to load plugins)" > ${chart_needs_lint_reverse} || fail "\"helmfile lint\" shouldn't fail"
diff -u ${lint_out_file} ${chart_needs_lint_reverse} || fail "\"helmfile lint\" should be consistent"
done

View File

@ -1,15 +1,8 @@
"azuredisk-csi-driver" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from "azuredisk-csi-driver" chart repository
...Successfully got an update from "ingress-nginx" chart repository
...Successfully got an update from "elastic" chart repository
...Successfully got an update from "incubator" chart repository
...Successfully got an update from "prometheus-community" chart repository
...Successfully got an update from "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈
[INFO] Chart.yaml: icon is recommended
[INFO] values.yaml: file does not exist
1 chart(s) linted, 0 chart(s) failed
[INFO] Chart.yaml: icon is recommended
1 chart(s) linted, 0 chart(s) failed

View File

@ -1,15 +1,8 @@
"azuredisk-csi-driver" has been added to your repositories
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from "azuredisk-csi-driver" chart repository
...Successfully got an update from "ingress-nginx" chart repository
...Successfully got an update from "elastic" chart repository
...Successfully got an update from "incubator" chart repository
...Successfully got an update from "prometheus-community" chart repository
...Successfully got an update from "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈
[INFO] Chart.yaml: icon is recommended
[INFO] values.yaml: file does not exist
1 chart(s) linted, 0 chart(s) failed
[INFO] Chart.yaml: icon is recommended
1 chart(s) linted, 0 chart(s) failed