web3coach / the-blockchain-bar

The source-code for: "Build a Blockchain from Scratch in Go" eBook.
https://web3.coach
GNU Lesser General Public License v3.0
499 stars 184 forks source link

[no tests to run] #28

Open Abzwingten opened 2 years ago

Abzwingten commented 2 years ago

In branch c11_consensus, while running tests according to the book go test -timeout=0 -count=1 ./node -test.v -test.run ^TestNode_Run$, testing returns error:

testing: warning: no tests to run
PASS
ok      github.com/web3coach/the-blockchain-bar/node    0.003s [no tests to run]

I have installed tbb with usual go install ./cmd/..., it works. How do I launch tests?

web3coach commented 2 years ago

Hmm what OS are u on?

I am able to run it on Linux: Screenshot from 2022-04-14 09-40-54

Abzwingten commented 2 years ago

I'm also on linux. Global go test ./... works fine, but function testing with ^TestMine$, ^TestNode$ fail. I undestand that the problem is not in your code, but it is still a mystery. GO variables are set just fine.

web3coach commented 2 years ago

Hmmm, thinking what could be the difference between our environments.

Have you tried Googling a different technique for running an individual test function?