gpt4 book ai didi

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

转载 作者:数据小太阳 更新时间:2023-10-29 03:37:55 24 4
gpt4 key购买 nike

很抱歉打扰你们,但我想知道如何才能最初运行 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$

最佳答案

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

关于go - 如何在 Hyperledger Fabric 代码上运行测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50783955/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com