【问题标题】:How can I run test on Hyperledger Fabric code?如何在 Hyperledger Fabric 代码上运行测试?
【发布时间】:2018-06-10 13:01:37
【问题描述】:

很抱歉打断你们,但我想知道如何才能运行 Hyperledger Fabric 代码。

我下载了所有的 Go、Docker、Docker composer、VSCode 和那些用于 Go 的插件。 当我在/orderer/solo 中使用go test consensus_test.go 时。

它会给我这些答案,那么我该如何运行这些代码呢?谢谢。

$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$

【问题讨论】:

    标签: go hyperledger-fabric


    【解决方案1】:

    已解决,但我不知道发生了什么以及为什么。 VScode会在顶部给出“运行文件测试||运行包测试”提示,我点击它运行成功。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-10-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-07
      • 1970-01-01
      相关资源
      最近更新 更多