Skip to content

Commit

Permalink
feat: use _test.go suffix on generate mock files to avoid their docum…
Browse files Browse the repository at this point in the history
…entation be parsed by gomarkdoc
  • Loading branch information
gfyrag committed Oct 16, 2024
1 parent 37127ff commit f4f49bc
Show file tree
Hide file tree
Showing 29 changed files with 3,223 additions and 97 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- Code generated by gomarkdoc. DO NOT EDIT -->

# src
# ledger

```go
import "github.com/formancehq/ledger"
Expand Down
5 changes: 2 additions & 3 deletions internal/api/common/middleware_resolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/formancehq/go-libs/api"
"github.com/formancehq/go-libs/logging"
ledgercontroller "github.com/formancehq/ledger/internal/controller/ledger"
systemcontroller "github.com/formancehq/ledger/internal/controller/system"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)
Expand Down Expand Up @@ -73,8 +72,8 @@ func TestResolverMiddleware(t *testing.T) {

ctrl := gomock.NewController(t)
ctx := logging.TestingContext()
systemController := systemcontroller.NewMockController(ctrl)
ledgerController := ledgercontroller.NewMockController(ctrl)
systemController := NewSystemController(ctrl)
ledgerController := NewLedgerController(ctrl)

ledger := tc.ledger

Expand Down
3 changes: 3 additions & 0 deletions internal/api/common/mocks.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//go:generate mockgen -write_source_comment=false -write_package_comment=false -source ../../controller/system/controller.go -destination mocks_system_controller_test.go -package common --mock_names Controller=SystemController . Controller
//go:generate mockgen -write_source_comment=false -write_package_comment=false -source ../../controller/ledger/controller.go -destination mocks_ledger_controller_test.go -package common --mock_names Controller=LedgerController . Controller
package common
334 changes: 334 additions & 0 deletions internal/api/common/mocks_ledger_controller_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f4f49bc

Please sign in to comment.