Commit Graph

3925 Commits

Author SHA1 Message Date
Matthieu MOREL
9662fdd73b refactor: enable several checks from gocritic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-10 11:07:34 +02:00
Terry Howe
d262c7ca79 Merge pull request #32296 from mmorel-35/gocritic-singleCaseSwitch
chore: fix emptyStringTest, nestingReduce and  singleCaseSwitch checks issues from gocritic
2026-07-07 12:05:43 -06:00
Matthieu MOREL
96b315f188 chore: fix emptyStringTest, nestingReduce and singleCaseSwitch checks issues from gocritic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-06 23:16:46 +02:00
Matthieu MOREL
c1569ea83f Update pkg/cmd/history_test.go
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-06 22:35:08 +02:00
Matthieu MOREL
65077c10fa test: replace assert.Equal with require.EqualError for improved error handling
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-06 22:35:08 +02:00
Matthieu MOREL
4ade4a5495 test: replace assert.Contains with assert.ErrorContains for better error handling
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-06 22:35:08 +02:00
Matthieu MOREL
f34ad6c337 chore: fix several checks issues from testifylint
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-06 22:35:08 +02:00
Matthieu MOREL
07259ecc86 chore: fix several checks issues from gocritic
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-07-06 08:36:33 +02:00
kimsungmin1
d539556a8d Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: kimsungmin1 <142377392+kimsungmin1@users.noreply.github.com>
2026-07-03 21:28:56 +09:00
kimsm28
503acff975 fix(registry): resolve golangci-lint issues in token-auth tests
- Use (*net.ListenConfig).Listen with the test context instead of
  net.Listen (noctx).
- Use suite.NoError instead of suite.Nil for the error check
  (testifylint).
- Drop the unnecessary leading blank lines in the scope test funcs
  (whitespace).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: kimsm28 <sm28.kim@samsung.com>
2026-07-02 21:57:38 +09:00
kimsm28
3cbee7e935 fix(registry): use plain-http registry in token-auth scope test
The scope test configured a TLS registry while advertising an http token
realm. oras refuses to send credentials to an http token realm when the
registry itself was contacted over https, so the auth server was never
reached and the test timed out ("timeout waiting for auth request").

Use a plain-http registry so the registry and token-realm schemes match;
the scope carried in the token request is what this test verifies, and
that is independent of TLS.

Also make the auth handler's channel send non-blocking so that a client
retry can never block the handler and stall the push/pull flow, which
addresses the review comment about a potential deadlock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: kimsm28 <sm28.kim@samsung.com>
2026-07-02 21:49:33 +09:00
Terry Howe
26ada49c1a Update pkg/registry/client.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2026-07-02 21:34:46 +09:00
kimsm28
9b7a70f0ca test: improve client_scope_test.go to avoid data races and brittle assertions
- Fix data race by using channel instead of shared variable for requestURL
- Make assertions more robust by parsing URL and checking query parameters instead of exact string matching

Signed-off-by: kimsm28 <sm28.kim@samsung.com>
2026-07-02 21:34:46 +09:00
kimsm28
ee181f4570 fix typos in withScopeHint function comment
- Change 'bellow' to 'below' (spelling correction in multiple places)
- Change 'WithScopeHint' to 'withScopeHint' to match actual function name

Signed-off-by: kimsm28 <sm28.kim@samsung.com>
2026-07-02 21:34:46 +09:00
kimsm28
1f0a728496 fix registry test failures by adjusting DockerRegistryHost and auth server listener management
- Change DockerRegistryHost to use 127.0.0.1 for HTTP tests and helm-test-registry for TLS tests to match certificate hostname
- Add defer ln.Close() to prevent resource leak in token auth server setup
- Restore requestURL variable and assertion in test body instead of handler to avoid potential race condition

Signed-off-by: kimsm28 <sm28.kim@samsung.com>
2026-07-02 21:34:46 +09:00
kimsm28
8883c9cc70 fix variable naming requestUrl -> requestURL
Signed-off-by: kimsm28 <sm28.kim@samsung.com>
2026-07-02 21:34:46 +09:00
kimsm28
530e728ea9 fix typo, remove unnecessary code, fix to avoid to use the assertion in http hanlder
Signed-off-by: kimsm28 <sm28.kim@samsung.com>
2026-07-02 21:34:46 +09:00
kimsungmin1
26e5071f66 change suite.Nil, suite.NotNill to more proper function(suite.NoError, suite.Error)
Signed-off-by: kimsungmin1 <sm28.kim@samsung.com>
2026-07-02 21:34:46 +09:00
kimsungmin1
8c8d6e3262 change client_scope_test.go to use httptest
Signed-off-by: kimsungmin1 <sm28.kim@samsung.com>
2026-07-02 21:34:46 +09:00
kimsungmin1
9d77ccd46d fix typo
Signed-off-by: kimsungmin1 <sm28.kim@samsung.com>
2026-07-02 21:34:46 +09:00
kimsungmin1
fc743b2a1b remove freeport dependency
Signed-off-by: kimsungmin1 <sm28.kim@samsung.com>
2026-07-02 21:34:46 +09:00
kimsungmin1
319e06cda3 add newline in license header
Signed-off-by: kimsungmin1 <sm28.kim@samsung.com>
2026-07-02 21:34:19 +09:00
kimsungmin1
301e3a12d5 fix scope when helm push to a registry that use token auth
Signed-off-by: kimsungmin1 <sm28.kim@samsung.com>
2026-07-02 21:34:19 +09:00
Terry Howe
188d331dc3 Merge pull request #32259 from gjenkins8/refactor/testify-pkg-cli
refactor(pkg/cli): convert tests to testify assert/require
2026-06-25 04:55:13 -06:00
George Jenkins
144246cd28 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-25 15:45:36 +12:00
Terry Howe
1ffd0012d3 Merge pull request #32221 from gjenkins8/refactor/testify-pkg-small
refactor(pkg): convert tests to testify assert/require
2026-06-23 05:31:15 -06:00
Terry Howe
0bca9871ad Merge pull request #32254 from gjenkins8/refactor/testify-pkg-registry
refactor(pkg/registry): convert tests to testify assert/require
2026-06-22 08:22:21 -06:00
Terry Howe
7e2bdcb526 Merge pull request #32255 from gjenkins8/refactor/testify-pkg-release
refactor(pkg/release): convert tests to testify assert/require
2026-06-22 07:51:49 -06:00
Terry Howe
662c99f910 Merge pull request #32253 from gjenkins8/refactor/testify-repotest
refactor(repotest): convert tests to testify assert/require
2026-06-22 07:21:58 -06:00
Terry Howe
645e6369a7 Merge pull request #32252 from gjenkins8/refactor/testify-pkg-strvals
refactor(pkg/strvals): convert tests to testify assert/require
2026-06-22 06:59:45 -06:00
George Jenkins
7ab295fcfc refactor(internal/release): convert tests to testify assert/require
Replace native Go testing patterns (t.Errorf, t.Fatalf, t.Error,
t.Fatal) with github.com/stretchr/testify equivalents (assert.X,
require.X) for improved test readability and error messages.

Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-22 21:01:24 +12:00
George Jenkins
4cce0e9e2a refactor(pkg/release): convert tests to testify assert/require
Replace native Go testing patterns (t.Errorf, t.Fatalf, t.Error,
t.Fatal) with github.com/stretchr/testify equivalents (assert.X,
require.X) for improved test readability and error messages.

Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-22 16:22:20 +12:00
George Jenkins
8b0a167484 refactor(pkg/registry): convert tests to testify assert/require
Replace native Go testing patterns (t.Errorf, t.Fatalf, t.Error,
t.Fatal) with github.com/stretchr/testify equivalents (assert.X,
require.X) for improved test readability and error messages.

Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-22 16:18:07 +12:00
George Jenkins
b42faba9d2 refactor(repotest): convert tests to testify assert/require
Replace native Go testing patterns (t.Errorf, t.Fatalf, t.Error,
t.Fatal) with github.com/stretchr/testify equivalents (assert.X,
require.X) for improved test readability and error messages.

Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-22 15:53:57 +12:00
Matthieu MOREL
34cfdfdbe5 chore: enable contextcheck, fatcontext and noctx linters
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2026-06-19 08:37:48 +00:00
Terry Howe
05b2746081 Merge pull request #32184 from atkrad/fix/kube-isreachable-nil-panic
fix panic on repeated IsReachable calls
2026-06-18 15:24:48 -06:00
Terry Howe
a092a1bd09 Merge pull request #31859 from biagiopietro/feature/rollback-revision-history
feat(history): add rollback revision column to helm history output
2026-06-18 15:04:51 -06:00
Terry Howe
c36e4d52bd test: use assert.Empty for zero-length assertions in validate_test
Signed-off-by: Terry Howe <terrylhowe@gmail.com>
2026-06-18 07:56:32 -06:00
Terry Howe
f59fae54cc Merge pull request #32233 from s3onghyun/docs-version-desc-typo
docs: fix typo in helm version command description
2026-06-18 06:21:45 -06:00
George Jenkins
253da5106a Merge pull request #32171 from mmorel-35/empty-len
Fix empty and len testifylint violations across test files
2026-06-18 19:57:07 +12:00
s3onghyun
dd442c0cc7 docs: fix typo in helm version command description
Signed-off-by: s3onghyun <s3onghyun.hong@gmail.com>
2026-06-18 16:03:12 +09:00
George Jenkins
422773cd49 Merge pull request #32129 from gregory-m/fix-test-logs-non-pod-hooks 2026-06-18 13:07:06 +12:00
George Jenkins
5655e3f2a4 Merge pull request #32230 from helm/revert-32081-fix/statuswait-delete-race
Revert "fix(kube): prevent spurious early exit in WaitForDelete during informer sync"
2026-06-18 07:27:13 +12:00
George Jenkins
fb9791f492 Merge pull request #32136 from SebTardif/fix-digest-error-swallow
fix(provenance): check error return in Digest and encodeRelease
2026-06-18 07:01:14 +12:00
George Jenkins
daa045d492 refactor(pkg/strvals): convert tests to testify assert/require
Replace native Go testing patterns (t.Errorf, t.Fatalf, t.Error,
t.Fatal) with github.com/stretchr/testify equivalents (assert.X,
require.X) for improved test readability and error messages.

Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-17 21:52:08 +12:00
George Jenkins
16b0760dfd refactor(pkg/cli): convert tests to testify assert/require
Replace native Go testing patterns (t.Errorf, t.Fatalf, t.Error,
t.Fatal) with github.com/stretchr/testify equivalents (assert.X,
require.X) for improved test readability and error messages.

Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-17 21:28:58 +12:00
George Jenkins
d3bd09147b Revert "fix(kube): prevent spurious early exit in WaitForDelete during informer sync"
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-17 13:25:18 +12:00
George Jenkins
9ad5620edc Update pkg/ignore/rules_test.go
Co-authored-by: Terry Howe <terrylhowe@gmail.com>
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-16 12:16:54 -07:00
George Jenkins
f4d713abb2 refactor(pkg): convert tests to testify assert/require
Convert pkg/gates, pkg/kubeenv, pkg/ignore, and pkg/helmpath test
files from native Go testing patterns (t.Errorf, t.Fatalf, t.Error,
t.Fatal) to github.com/stretchr/testify equivalents (assert.X,
require.X).

Signed-off-by: George Jenkins <gvjenkins@gmail.com>
2026-06-16 16:17:14 +12:00
Jeaeun Kim
9c1d5a3b24 chore: rename savedErr to clear its specific purpose
Signed-off-by: Jeaeun Kim <me@kyoku.dev>
2026-06-13 12:26:10 +09:00