helm/pkg
Rostyslav Polishchuk 1c8d1e375f fix: chart icon presence test
The `TestValidateChartIconPresence` test fails when run after
`TestValidateChartIconURL` as they both are using a global
variable `badChart.Icon`

```
: go test -v -test.shuffle 1 -run '^(TestValidateChartIconPresence|TestValidateChartIconURL)$' ./pkg/lint/rules/
-test.shuffle 1
=== RUN   TestValidateChartIconURL
--- PASS: TestValidateChartIconURL (0.00s)
=== RUN   TestValidateChartIconPresence
    chartfile_test.go:171: validateChartIconPresence to return a linter error, got no error
--- FAIL: TestValidateChartIconPresence (0.00s)
FAIL
FAIL    helm.sh/helm/v4/pkg/lint/rules  0.051s
FAIL

: go test -v -test.shuffle 2 -run '^(TestValidateChartIconPresence|TestValidateChartIconURL)$' ./pkg/lint/rules/
-test.shuffle 2
=== RUN   TestValidateChartIconPresence
--- PASS: TestValidateChartIconPresence (0.00s)
=== RUN   TestValidateChartIconURL
--- PASS: TestValidateChartIconURL (0.00s)
PASS
ok      helm.sh/helm/v4/pkg/lint/rules  0.050s
```

This commit:

1. Remove dependency on global variable
2. Explicitly set the state of the test object.

Signed-off-by: Rostyslav Polishchuk <rostyslavp@google.com>
2025-04-22 18:56:13 +00:00
..
action Merge pull request #30737 from rpolishchuk/investigation-pr-30610 2025-04-11 16:06:45 -04:00
chart/v2 Merge pull request #30708 from benoittgt/migrate-kube-pkg-to-slog 2025-04-11 20:50:34 +01:00
cli Use the logger with proper handling of dynamic debug on 2 locations 2025-04-10 16:02:05 +02:00
cmd Removing the alpine test chart 2025-04-11 16:01:49 -04:00
downloader Move pkg/chart to pkg/chart/v2 to prepare for v3 charts 2025-02-25 15:20:44 -05:00
engine Merge pull request #30708 from benoittgt/migrate-kube-pkg-to-slog 2025-04-11 20:50:34 +01:00
gates Bump the Go version 2023-03-22 11:29:26 -04:00
getter Use NewTLSConfig instead of the outdated NewClientTLS func 2025-03-24 10:54:42 -04:00
helmpath Updating to helm.sh/helm/v4 2025-01-08 15:34:20 -08:00
ignore Leverage slog.Any for errors 2025-04-07 18:26:48 +02:00
kube Fix nil pointer dereference in ready test 2025-04-10 16:40:05 +02:00
lint fix: chart icon presence test 2025-04-22 18:56:13 +00:00
plugin making changes as requested by matt 2025-03-10 15:40:10 -04:00
postrender Apply suggestions from code review 2025-02-24 07:26:12 +02:00
provenance Move pkg/chart to pkg/chart/v2 to prepare for v3 charts 2025-02-25 15:20:44 -05:00
pusher Move pkg/chart to pkg/chart/v2 to prepare for v3 charts 2025-02-25 15:20:44 -05:00
registry Merge pull request #30684 from twz123/remove-clientoptresolver 2025-03-21 16:34:14 -04:00
release fix: correct webhook order to match Kubernetes admission flow 2025-04-08 19:05:55 -07:00
repo Merge pull request #30603 from robertsirc/converting-to-slog 2025-03-21 16:18:40 -04:00
storage Call slog directly instead of using a wrapper 2025-04-10 15:35:36 +02:00
strvals Merge pull request #13344 from AdamKorcz/fuzzzz1 2024-10-04 21:47:22 +02:00
time chore: fix problems with latest lint 2024-12-10 10:40:37 -07:00
uploader Updating to helm.sh/helm/v4 2025-01-08 15:34:20 -08:00