Skip to content

fix: add doc.go files to mock packages to fix import errors - #161

Open
Kubudak90 wants to merge 1 commit into
coinbase:masterfrom
Kubudak90:fix-mock-imports
Open

fix: add doc.go files to mock packages to fix import errors#161
Kubudak90 wants to merge 1 commit into
coinbase:masterfrom
Kubudak90:fix-mock-imports

Conversation

@Kubudak90

Copy link
Copy Markdown

Description

Fixes #146

This PR adds doc.go files to the mocks/client and mocks/services packages to ensure they are properly recognized as Go packages. This resolves the 'no required module provides package' errors when running tests.

Changes

  • Added mocks/client/doc.go with package documentation
  • Added mocks/services/doc.go with package documentation

Problem

When running go test ./..., the following errors occur:

client/client_test.go:20:2: no required module provides package github.com/coinbase/rosetta-geth-sdk/mocks/client
client/client_test.go:21:2: no required module provides package github.com/coinbase/rosetta-geth-sdk/mocks/services

Solution

Go packages that contain only generated/mock files may not be properly recognized by the Go toolchain. Adding a doc.go file with proper package declaration ensures the packages are discoverable.

Testing

After this change, go test ./... should run without import errors.

Add doc.go files to mocks/client and mocks/services packages to ensure
they are properly recognized as Go packages. This fixes the 'no required
module provides package' errors when running tests.

Fixes coinbase#146
@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

All tests for packages client and services fail

2 participants