douluo2930 2018-06-10 13:01
浏览 117

如何在Hyperledger Fabric代码上运行测试?

I'm sorry to interrupt you guys, but I wish to know how can I run the Hyperledger Fabric code originally.

I download all the Go, Docker, Docker composer, VSCode and those plugins for Go. And when I using go test consensus_test.go in /orderer/solo.

It will give me these answer, so how can I run these code? Thank you.

$fabric@ubuntu:~/go/src/github.com/hyperledger/fabric/orderer/consensus/solo$ go test consensus_test.go
# command-line-arguments
./consensus_test.go:35:26: undefined: pkgLogID
./consensus_test.go:45:48: undefined: chain
./consensus_test.go:74:8: undefined: newChain
./consensus_test.go:95:11: undefined: New
./consensus_test.go:116:8: undefined: newChain
./consensus_test.go:134:8: undefined: newChain
./consensus_test.go:178:8: undefined: newChain
./consensus_test.go:220:8: undefined: newChain
./consensus_test.go:256:8: undefined: newChain
./consensus_test.go:293:8: undefined: newChain
./consensus_test.go:293:8: too many errors
FAIL    command-line-arguments [build failed]
fabric@ubuntu:~/go/src/github.com/hyperledger/fabric/orderer/consensus/solo$
  • 写回答

1条回答 默认 最新

  • dongxuan8227 2018-06-10 13:10
    关注

    Solved, but I don't know what happened and why. VScode will gives a "run file test||run package test" hint on the top, I click it and it running success.

    评论

报告相同问题?

悬赏问题

  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出