在golang的分叉仓库中进行测试时,测试如何工作?

Consider a situation where a test is failing in a golang project, say "github.com/originaluser/reponame".

A person who wants to fix the bug forks the repo into github.com/forkeduser/reponame" and then go gets it into his local machine.

The test will fail on his machine even after he fixes the bug if the test file is importing from "github.com/originaluser/reponame" because his changes have not been merged with the original project.

How does testing work in such a scenario?

The only resource I found was a splice.com blog

Just a short and simple solution it to clone the forked repository into the original repository path.

Step 1: create the path github.com/originaluser/reponame inside your gopath.

Step 2: change the working directory to your new folder

Step 3: git clone github.com/forkeduser/reponame.git

Step 4: fix the bug

Because now your fix is inside the original path, everything works.