Skip to content

Commit d8aa1ca

Browse files
committed
test: replace mocks with mockgen mocks
* Replaced table-driven tests with direct mock setup for single-case tests to improve readability and reduce unnecessary indirection. * Used GoMock idioms (.Return, .Times, .After) for retry logic to make mock expectations clearer and more robust. * Added comments to clarify mock and test intent, aiding future maintainers. * Ensured all retry, error, and success paths are covered to match production logic and prevent regressions. * Maintained test and code coverage at the level of the main branch to ensure no loss in quality.
1 parent 3b59029 commit d8aa1ca

File tree

3 files changed

+154
-378
lines changed

3 files changed

+154
-378
lines changed

internal/cmd/images/manifest_cmd_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,8 @@ import (
66
"testing"
77

88
"github.com/google/go-cmp/cmp"
9-
helmlib "github.com/mittwald/go-helm-client"
10-
11-
"github.com/airbytehq/abctl/internal/helm"
129
)
1310

14-
func getHelmTestClient(t *testing.T) helm.Client {
15-
client, err := helmlib.New(nil)
16-
if err != nil {
17-
t.Fatal(err)
18-
}
19-
return client
20-
}
21-
2211
func TestManifestCmd(t *testing.T) {
2312
cmd := ManifestCmd{
2413
ChartVersion: "1.1.0",

0 commit comments

Comments
 (0)