Commit bbd3a1b6 authored by vipwzw's avatar vipwzw

auto ci

parent adc9354e
...@@ -16,7 +16,7 @@ function filterLinter() { ...@@ -16,7 +16,7 @@ function filterLinter() {
--enable=structcheck \ --enable=structcheck \
--enable=goimports \ --enable=goimports \
--enable=misspell \ --enable=misspell \
--enable=golint \ --enable=golint \
--vendor ./...) --vendor ./...)
# --enable=staticcheck \ # --enable=staticcheck \
# --enable=gocyclo \ # --enable=gocyclo \
......
package init package init
import ( import (
_ "github.com/33cn/plugin/plugin/consensus/para" // register para package _ "github.com/33cn/plugin/plugin/consensus/para" // register para package
_ "github.com/33cn/plugin/plugin/consensus/pbft" // register pbft package _ "github.com/33cn/plugin/plugin/consensus/pbft" // register pbft package
_ "github.com/33cn/plugin/plugin/consensus/raft" // register raft package _ "github.com/33cn/plugin/plugin/consensus/raft" // register raft package
_ "github.com/33cn/plugin/plugin/consensus/tendermint" // register tendermint package _ "github.com/33cn/plugin/plugin/consensus/tendermint" // register tendermint package
_ "github.com/33cn/plugin/plugin/consensus/ticket" // register ticket package _ "github.com/33cn/plugin/plugin/consensus/ticket" // register ticket package
) )
package init package init
import ( import (
_ "github.com/33cn/plugin/plugin/crypto/ecdsa" // register ecdsa package _ "github.com/33cn/plugin/plugin/crypto/ecdsa" // register ecdsa package
_ "github.com/33cn/plugin/plugin/crypto/sm2" // register sm2 package _ "github.com/33cn/plugin/plugin/crypto/sm2" // register sm2 package
) )
package init package init
import ( import (
_ "github.com/33cn/plugin/plugin/dapp/blackwhite" // register blackwhite package _ "github.com/33cn/plugin/plugin/dapp/blackwhite" // register blackwhite package
_ "github.com/33cn/plugin/plugin/dapp/cert" // register cert package _ "github.com/33cn/plugin/plugin/dapp/cert" // register cert package
_ "github.com/33cn/plugin/plugin/dapp/evm" // register evm package _ "github.com/33cn/plugin/plugin/dapp/evm" // register evm package
_ "github.com/33cn/plugin/plugin/dapp/game" // register game package _ "github.com/33cn/plugin/plugin/dapp/game" // register game package
_ "github.com/33cn/plugin/plugin/dapp/hashlock" // register hashlock package _ "github.com/33cn/plugin/plugin/dapp/hashlock" // register hashlock package
_ "github.com/33cn/plugin/plugin/dapp/lottery" // register lottery package _ "github.com/33cn/plugin/plugin/dapp/lottery" // register lottery package
_ "github.com/33cn/plugin/plugin/dapp/norm" // register norm package _ "github.com/33cn/plugin/plugin/dapp/norm" // register norm package
_ "github.com/33cn/plugin/plugin/dapp/paracross" // register paracross package _ "github.com/33cn/plugin/plugin/dapp/paracross" // register paracross package
_ "github.com/33cn/plugin/plugin/dapp/pokerbull" // register pokerbull package _ "github.com/33cn/plugin/plugin/dapp/pokerbull" // register pokerbull package
_ "github.com/33cn/plugin/plugin/dapp/privacy" // register privacy package _ "github.com/33cn/plugin/plugin/dapp/privacy" // register privacy package
_ "github.com/33cn/plugin/plugin/dapp/relay" // register relay package _ "github.com/33cn/plugin/plugin/dapp/relay" // register relay package
_ "github.com/33cn/plugin/plugin/dapp/retrieve" // register retrieve package _ "github.com/33cn/plugin/plugin/dapp/retrieve" // register retrieve package
_ "github.com/33cn/plugin/plugin/dapp/ticket" // register ticker package _ "github.com/33cn/plugin/plugin/dapp/ticket" // register ticker package
_ "github.com/33cn/plugin/plugin/dapp/token" // register token package _ "github.com/33cn/plugin/plugin/dapp/token" // register token package
_ "github.com/33cn/plugin/plugin/dapp/trade" // register trade package _ "github.com/33cn/plugin/plugin/dapp/trade" // register trade package
_ "github.com/33cn/plugin/plugin/dapp/valnode" // register valnode package _ "github.com/33cn/plugin/plugin/dapp/valnode" // register valnode package
) )
...@@ -6,13 +6,13 @@ package privacy ...@@ -6,13 +6,13 @@ package privacy
import ( import (
"github.com/33cn/chain33/pluginmgr" "github.com/33cn/chain33/pluginmgr"
_ "github.com/33cn/plugin/plugin/dapp/privacy/autotest" // register autotest package _ "github.com/33cn/plugin/plugin/dapp/privacy/autotest" // register autotest package
"github.com/33cn/plugin/plugin/dapp/privacy/commands" "github.com/33cn/plugin/plugin/dapp/privacy/commands"
_ "github.com/33cn/plugin/plugin/dapp/privacy/crypto" // register crypto package _ "github.com/33cn/plugin/plugin/dapp/privacy/crypto" // register crypto package
"github.com/33cn/plugin/plugin/dapp/privacy/executor" "github.com/33cn/plugin/plugin/dapp/privacy/executor"
"github.com/33cn/plugin/plugin/dapp/privacy/rpc" "github.com/33cn/plugin/plugin/dapp/privacy/rpc"
"github.com/33cn/plugin/plugin/dapp/privacy/types" "github.com/33cn/plugin/plugin/dapp/privacy/types"
_ "github.com/33cn/plugin/plugin/dapp/privacy/wallet" // register wallet package _ "github.com/33cn/plugin/plugin/dapp/privacy/wallet" // register wallet package
) )
func init() { func init() {
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
package types package types
import "errors" import "errors"
// ErrXXX defines error message // ErrXXX defines error message
var ( var (
ErrGeFromBytesVartime = errors.New("ErrGeFromBytesVartime") ErrGeFromBytesVartime = errors.New("ErrGeFromBytesVartime")
......
...@@ -12,11 +12,11 @@ import ( ...@@ -12,11 +12,11 @@ import (
) )
type tokenAutoTest struct { type tokenAutoTest struct {
SimpleCaseArr []types.SimpleCase `toml:"SimpleCase,omitempty"` SimpleCaseArr []types.SimpleCase `toml:"SimpleCase,omitempty"`
TokenPreCreateCaseArr []TokenPreCreateCase `toml:"TokenPreCreateCase,omitempty"` TokenPreCreateCaseArr []TokenPreCreateCase `toml:"TokenPreCreateCase,omitempty"`
TokenFinishCreateCaseArr []TokenFinishCreateCase `toml:"TokenFinishCreateCase,omitempty"` TokenFinishCreateCaseArr []TokenFinishCreateCase `toml:"TokenFinishCreateCase,omitempty"`
TransferCaseArr []autotest.TransferCase `toml:"TransferCase,omitempty"` TransferCaseArr []autotest.TransferCase `toml:"TransferCase,omitempty"`
WithdrawCaseArr []autotest.WithdrawCase `toml:"WithdrawCase,omitempty"` WithdrawCaseArr []autotest.WithdrawCase `toml:"WithdrawCase,omitempty"`
TokenRevokeCaseArr []TokenRevokeCase `toml:"TokenRevokeCase,omitempty"` TokenRevokeCaseArr []TokenRevokeCase `toml:"TokenRevokeCase,omitempty"`
} }
......
...@@ -2,50 +2,58 @@ ...@@ -2,50 +2,58 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
package autotest package autotest
import ( import (
"github.com/33cn/chain33/cmd/autotest/types" "github.com/33cn/chain33/cmd/autotest/types"
) )
// TokenPreCreateCase token precreatecase command // TokenPreCreateCase token precreatecase command
type TokenPreCreateCase struct { type TokenPreCreateCase struct {
types.BaseCase types.BaseCase
//From string `toml:"from"` //From string `toml:"from"`
//Amount string `toml:"amount"` //Amount string `toml:"amount"`
} }
// TokenPreCreatePack defines token precreate package command // TokenPreCreatePack defines token precreate package command
type TokenPreCreatePack struct { type TokenPreCreatePack struct {
types.BaseCasePack types.BaseCasePack
} }
// TokenFinishCreateCase token finish create case command // TokenFinishCreateCase token finish create case command
type TokenFinishCreateCase struct { type TokenFinishCreateCase struct {
types.BaseCase types.BaseCase
//From string `toml:"from"` //From string `toml:"from"`
//Amount string `toml:"amount"` //Amount string `toml:"amount"`
} }
// TokenFinishCreatePack token finish create pack command // TokenFinishCreatePack token finish create pack command
type TokenFinishCreatePack struct { type TokenFinishCreatePack struct {
types.BaseCasePack types.BaseCasePack
} }
// TokenRevokeCase token revoke case command // TokenRevokeCase token revoke case command
type TokenRevokeCase struct { type TokenRevokeCase struct {
types.BaseCase types.BaseCase
} }
// TokenRevokePack token revoke pack command // TokenRevokePack token revoke pack command
type TokenRevokePack struct { type TokenRevokePack struct {
types.BaseCasePack types.BaseCasePack
} }
// SendCommand defines send command function of tokenprecreatecase // SendCommand defines send command function of tokenprecreatecase
func (testCase *TokenPreCreateCase) SendCommand(packID string) (types.PackFunc, error) { func (testCase *TokenPreCreateCase) SendCommand(packID string) (types.PackFunc, error) {
return types.DefaultSend(testCase, &TokenPreCreatePack{}, packID) return types.DefaultSend(testCase, &TokenPreCreatePack{}, packID)
} }
// SendCommand defines send command function of tokenrevokecase // SendCommand defines send command function of tokenrevokecase
func (testCase *TokenRevokeCase) SendCommand(packID string) (types.PackFunc, error) { func (testCase *TokenRevokeCase) SendCommand(packID string) (types.PackFunc, error) {
return types.DefaultSend(testCase, &TokenRevokePack{}, packID) return types.DefaultSend(testCase, &TokenRevokePack{}, packID)
} }
// SendCommand send command function of tokenfinishcreatecase // SendCommand send command function of tokenfinishcreatecase
func (testCase *TokenFinishCreateCase) SendCommand(packID string) (types.PackFunc, error) { func (testCase *TokenFinishCreateCase) SendCommand(packID string) (types.PackFunc, error) {
......
...@@ -7,7 +7,7 @@ package token ...@@ -7,7 +7,7 @@ package token
import ( import (
"github.com/33cn/chain33/pluginmgr" "github.com/33cn/chain33/pluginmgr"
_ "github.com/33cn/plugin/plugin/dapp/token/autotest" // register token autotest package _ "github.com/33cn/plugin/plugin/dapp/token/autotest" // register token autotest package
"github.com/33cn/plugin/plugin/dapp/token/commands" "github.com/33cn/plugin/plugin/dapp/token/commands"
"github.com/33cn/plugin/plugin/dapp/token/executor" "github.com/33cn/plugin/plugin/dapp/token/executor"
"github.com/33cn/plugin/plugin/dapp/token/rpc" "github.com/33cn/plugin/plugin/dapp/token/rpc"
......
...@@ -11,6 +11,7 @@ import ( ...@@ -11,6 +11,7 @@ import (
"github.com/33cn/chain33/cmd/autotest/types" "github.com/33cn/chain33/cmd/autotest/types"
) )
// BuyCase defines buycase command // BuyCase defines buycase command
type BuyCase struct { type BuyCase struct {
types.BaseCase types.BaseCase
...@@ -19,19 +20,23 @@ type BuyCase struct { ...@@ -19,19 +20,23 @@ type BuyCase struct {
TokenAmount string `toml:"tokenAmount"` TokenAmount string `toml:"tokenAmount"`
BtyAmount string `toml:"btyAmount"` BtyAmount string `toml:"btyAmount"`
} }
// BuyPack defines buypack command // BuyPack defines buypack command
type BuyPack struct { type BuyPack struct {
types.BaseCasePack types.BaseCasePack
} }
// DependBuyCase defines depend buycase command // DependBuyCase defines depend buycase command
type DependBuyCase struct { type DependBuyCase struct {
BuyCase BuyCase
SellID string `toml:"sellID,omitempty"` SellID string `toml:"sellID,omitempty"`
} }
// DependBuyPack defines depend buy pack command // DependBuyPack defines depend buy pack command
type DependBuyPack struct { type DependBuyPack struct {
BuyPack BuyPack
} }
// SendCommand defines send command function of dependbuycase // SendCommand defines send command function of dependbuycase
func (testCase *DependBuyCase) SendCommand(packID string) (types.PackFunc, error) { func (testCase *DependBuyCase) SendCommand(packID string) (types.PackFunc, error) {
...@@ -42,6 +47,7 @@ func (testCase *DependBuyCase) SendCommand(packID string) (types.PackFunc, error ...@@ -42,6 +47,7 @@ func (testCase *DependBuyCase) SendCommand(packID string) (types.PackFunc, error
return types.DefaultSend(&testCase.BuyCase, &BuyPack{}, packID) return types.DefaultSend(&testCase.BuyCase, &BuyPack{}, packID)
} }
// SetDependData defines set depend data function // SetDependData defines set depend data function
func (testCase *DependBuyCase) SetDependData(depData interface{}) { func (testCase *DependBuyCase) SetDependData(depData interface{}) {
...@@ -50,6 +56,7 @@ func (testCase *DependBuyCase) SetDependData(depData interface{}) { ...@@ -50,6 +56,7 @@ func (testCase *DependBuyCase) SetDependData(depData interface{}) {
testCase.SellID = orderInfo.sellID testCase.SellID = orderInfo.sellID
} }
} }
// GetCheckHandlerMap defines get check handler for map // GetCheckHandlerMap defines get check handler for map
func (pack *BuyPack) GetCheckHandlerMap() interface{} { func (pack *BuyPack) GetCheckHandlerMap() interface{} {
......
...@@ -9,26 +9,31 @@ import ( ...@@ -9,26 +9,31 @@ import (
"github.com/33cn/chain33/cmd/autotest/types" "github.com/33cn/chain33/cmd/autotest/types"
) )
// SellCase defines sell case command // SellCase defines sell case command
type SellCase struct { type SellCase struct {
types.BaseCase types.BaseCase
From string `toml:"from"` From string `toml:"from"`
Amount string `toml:"amount"` Amount string `toml:"amount"`
} }
// SellPack defines sell pack command // SellPack defines sell pack command
type SellPack struct { type SellPack struct {
types.BaseCasePack types.BaseCasePack
orderInfo *SellOrderInfo orderInfo *SellOrderInfo
} }
// SellOrderInfo sell order information // SellOrderInfo sell order information
type SellOrderInfo struct { type SellOrderInfo struct {
sellID string sellID string
} }
// SendCommand send command of sellcase // SendCommand send command of sellcase
func (testCase *SellCase) SendCommand(packID string) (types.PackFunc, error) { func (testCase *SellCase) SendCommand(packID string) (types.PackFunc, error) {
return types.DefaultSend(testCase, &SellPack{}, packID) return types.DefaultSend(testCase, &SellPack{}, packID)
} }
// GetCheckHandlerMap defines get check handle for map // GetCheckHandlerMap defines get check handle for map
func (pack *SellPack) GetCheckHandlerMap() interface{} { func (pack *SellPack) GetCheckHandlerMap() interface{} {
...@@ -38,6 +43,7 @@ func (pack *SellPack) GetCheckHandlerMap() interface{} { ...@@ -38,6 +43,7 @@ func (pack *SellPack) GetCheckHandlerMap() interface{} {
return funcMap return funcMap
} }
// GetDependData defines get depend data function // GetDependData defines get depend data function
func (pack *SellPack) GetDependData() interface{} { func (pack *SellPack) GetDependData() interface{} {
......
...@@ -13,12 +13,12 @@ import ( ...@@ -13,12 +13,12 @@ import (
) )
type tradeAutoTest struct { type tradeAutoTest struct {
SimpleCaseArr []types.SimpleCase `toml:"SimpleCase,omitempty"` SimpleCaseArr []types.SimpleCase `toml:"SimpleCase,omitempty"`
TokenPreCreateCaseArr []tokenautotest.TokenPreCreateCase `toml:"TokenPreCreateCase,omitempty"` TokenPreCreateCaseArr []tokenautotest.TokenPreCreateCase `toml:"TokenPreCreateCase,omitempty"`
TokenFinishCreateCaseArr []tokenautotest.TokenFinishCreateCase `toml:"TokenFinishCreateCase,omitempty"` TokenFinishCreateCaseArr []tokenautotest.TokenFinishCreateCase `toml:"TokenFinishCreateCase,omitempty"`
TransferCaseArr []coinautotest.TransferCase `toml:"TransferCase,omitempty"` TransferCaseArr []coinautotest.TransferCase `toml:"TransferCase,omitempty"`
SellCaseArr []SellCase `toml:"SellCase,omitempty"` SellCaseArr []SellCase `toml:"SellCase,omitempty"`
DependBuyCaseArr []DependBuyCase `toml:"DependBuyCase,omitempty"` DependBuyCaseArr []DependBuyCase `toml:"DependBuyCase,omitempty"`
} }
func init() { func init() {
......
...@@ -6,7 +6,7 @@ package trade ...@@ -6,7 +6,7 @@ package trade
import ( import (
"github.com/33cn/chain33/pluginmgr" "github.com/33cn/chain33/pluginmgr"
_ "github.com/33cn/plugin/plugin/dapp/trade/autotest" // register autotest package _ "github.com/33cn/plugin/plugin/dapp/trade/autotest" // register autotest package
"github.com/33cn/plugin/plugin/dapp/trade/commands" "github.com/33cn/plugin/plugin/dapp/trade/commands"
"github.com/33cn/plugin/plugin/dapp/trade/executor" "github.com/33cn/plugin/plugin/dapp/trade/executor"
"github.com/33cn/plugin/plugin/dapp/trade/rpc" "github.com/33cn/plugin/plugin/dapp/trade/rpc"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
package plugin package plugin
import ( import (
_ "github.com/33cn/plugin/plugin/consensus/init" // register consensus init package _ "github.com/33cn/plugin/plugin/consensus/init" // register consensus init package
_ "github.com/33cn/plugin/plugin/crypto/init" _ "github.com/33cn/plugin/plugin/crypto/init"
_ "github.com/33cn/plugin/plugin/dapp/init" _ "github.com/33cn/plugin/plugin/dapp/init"
_ "github.com/33cn/plugin/plugin/store/init" _ "github.com/33cn/plugin/plugin/store/init"
......
package init package init
import ( import (
_ "github.com/33cn/plugin/plugin/store/kvdb" // register kvdb package _ "github.com/33cn/plugin/plugin/store/kvdb" // register kvdb package
_ "github.com/33cn/plugin/plugin/store/kvmvcc" // register kvmvcc package _ "github.com/33cn/plugin/plugin/store/kvmvcc" // register kvmvcc package
_ "github.com/33cn/plugin/plugin/store/mpt" // register mpt package _ "github.com/33cn/plugin/plugin/store/mpt" // register mpt package
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment