Commit e9985ab0 authored by vipwzw's avatar vipwzw Committed by 33cn

auto ci

parent 9b962259
...@@ -126,9 +126,9 @@ func (a *Autonomy) listProposalBoard(req *auty.ReqQueryProposalBoard) (types.Mes ...@@ -126,9 +126,9 @@ func (a *Autonomy) listProposalBoard(req *auty.ReqQueryProposalBoard) (types.Mes
AutonomyProposalBoard: &auty.AutonomyProposalBoard{}, AutonomyProposalBoard: &auty.AutonomyProposalBoard{},
} }
cur.Address = req.Addr cur.Address = req.Addr
cur.Status = req.Status cur.Status = req.Status
cur.Height = req.Height cur.Height = req.Height
cur.Index = req.Index cur.Index = req.Index
prefix, err := cur.Get(indexName) prefix, err := cur.Get(indexName)
rows, err := query.ListIndex(indexName, prefix, primary, req.Count, req.Direction) rows, err := query.ListIndex(indexName, prefix, primary, req.Count, req.Direction)
......
...@@ -7,13 +7,13 @@ package executor ...@@ -7,13 +7,13 @@ package executor
import ( import (
"testing" "testing"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp" "github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
"github.com/33cn/chain33/util" "github.com/33cn/chain33/util"
auty "github.com/33cn/plugin/plugin/dapp/autonomy/types" auty "github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/33cn/chain33/common/db" "github.com/stretchr/testify/require"
) )
func TestExecLocalBoard(t *testing.T) { func TestExecLocalBoard(t *testing.T) {
...@@ -48,7 +48,6 @@ func TestExecLocalBoard(t *testing.T) { ...@@ -48,7 +48,6 @@ func TestExecLocalBoard(t *testing.T) {
// check // check
checkExecLocalBoard(t, kvdb, cur) checkExecLocalBoard(t, kvdb, cur)
// TyLogRvkPropBoard // TyLogRvkPropBoard
pre1 := copyAutonomyProposalBoard(cur) pre1 := copyAutonomyProposalBoard(cur)
cur.Status = auty.AutonomyStatusRvkPropBoard cur.Status = auty.AutonomyStatusRvkPropBoard
...@@ -142,7 +141,6 @@ func TestExecDelLocalBoard(t *testing.T) { ...@@ -142,7 +141,6 @@ func TestExecDelLocalBoard(t *testing.T) {
_, err = query.ListIndex("addr_status", nil, nil, 10, 0) _, err = query.ListIndex("addr_status", nil, nil, 10, 0)
assert.Equal(t, err, types.ErrNotFound) assert.Equal(t, err, types.ErrNotFound)
// TyLogVotePropBoard // TyLogVotePropBoard
pre1 := copyAutonomyProposalBoard(cur) pre1 := copyAutonomyProposalBoard(cur)
cur.Status = auty.AutonomyStatusVotePropBoard cur.Status = auty.AutonomyStatusVotePropBoard
...@@ -294,7 +292,7 @@ func TestListProposalBoard(t *testing.T) { ...@@ -294,7 +292,7 @@ func TestListProposalBoard(t *testing.T) {
Status: auty.AutonomyStatusProposalBoard, Status: auty.AutonomyStatusProposalBoard,
Count: 10, Count: 10,
Direction: 0, Direction: 0,
Height: height, Height: height,
Index: index, Index: index,
} }
rsp, err = au.listProposalBoard(req) rsp, err = au.listProposalBoard(req)
...@@ -340,4 +338,4 @@ func saveKvs(sdb db.DB, kvs []*types.KeyValue) { ...@@ -340,4 +338,4 @@ func saveKvs(sdb db.DB, kvs []*types.KeyValue) {
sdb.Set(kv.Key, kv.Value) sdb.Set(kv.Key, kv.Value)
} }
} }
} }
\ No newline at end of file
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
"github.com/33cn/chain33/common/db" "github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/table" "github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
auty "github.com/33cn/plugin/plugin/dapp/autonomy/types" auty "github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/33cn/chain33/system/dapp"
) )
/* /*
......
...@@ -124,9 +124,9 @@ func (a *Autonomy) listProposalProject(req *auty.ReqQueryProposalProject) (types ...@@ -124,9 +124,9 @@ func (a *Autonomy) listProposalProject(req *auty.ReqQueryProposalProject) (types
AutonomyProposalProject: &auty.AutonomyProposalProject{}, AutonomyProposalProject: &auty.AutonomyProposalProject{},
} }
cur.Address = req.Addr cur.Address = req.Addr
cur.Status = req.Status cur.Status = req.Status
cur.Height = req.Height cur.Height = req.Height
cur.Index = req.Index cur.Index = req.Index
prefix, err := cur.Get(indexName) prefix, err := cur.Get(indexName)
rows, err := query.ListIndex(indexName, prefix, primary, req.Count, req.Direction) rows, err := query.ListIndex(indexName, prefix, primary, req.Count, req.Direction)
......
...@@ -7,13 +7,13 @@ package executor ...@@ -7,13 +7,13 @@ package executor
import ( import (
"testing" "testing"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp" "github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
"github.com/33cn/chain33/util" "github.com/33cn/chain33/util"
auty "github.com/33cn/plugin/plugin/dapp/autonomy/types" auty "github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/stretchr/testify/require"
"github.com/33cn/chain33/common/db"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
) )
func TestExecLocalProject(t *testing.T) { func TestExecLocalProject(t *testing.T) {
...@@ -298,7 +298,7 @@ func TestListProposalProject(t *testing.T) { ...@@ -298,7 +298,7 @@ func TestListProposalProject(t *testing.T) {
Status: auty.AutonomyStatusProposalProject, Status: auty.AutonomyStatusProposalProject,
Count: 10, Count: 10,
Direction: 0, Direction: 0,
Height: height, Height: height,
Index: index, Index: index,
} }
rsp, err = au.listProposalProject(req) rsp, err = au.listProposalProject(req)
...@@ -334,4 +334,4 @@ func checkExecLocalProject(t *testing.T, kvdb db.KVDB, cur *auty.AutonomyProposa ...@@ -334,4 +334,4 @@ func checkExecLocalProject(t *testing.T, kvdb db.KVDB, cur *auty.AutonomyProposa
assert.Equal(t, true, ok) assert.Equal(t, true, ok)
assert.Equal(t, prop, cur) assert.Equal(t, prop, cur)
} }
\ No newline at end of file
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
"github.com/33cn/chain33/common/db" "github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/table" "github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
auty "github.com/33cn/plugin/plugin/dapp/autonomy/types" auty "github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/33cn/chain33/system/dapp"
) )
/* /*
......
...@@ -81,7 +81,6 @@ func (a *Autonomy) execDelLocalRule(receiptData *types.ReceiptData) (*types.Loca ...@@ -81,7 +81,6 @@ func (a *Autonomy) execDelLocalRule(receiptData *types.ReceiptData) (*types.Loca
return dbSet, nil return dbSet, nil
} }
func (a *Autonomy) getProposalRule(req *types.ReqString) (types.Message, error) { func (a *Autonomy) getProposalRule(req *types.ReqString) (types.Message, error) {
if req == nil { if req == nil {
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
...@@ -124,9 +123,9 @@ func (a *Autonomy) listProposalRule(req *auty.ReqQueryProposalRule) (types.Messa ...@@ -124,9 +123,9 @@ func (a *Autonomy) listProposalRule(req *auty.ReqQueryProposalRule) (types.Messa
AutonomyProposalRule: &auty.AutonomyProposalRule{}, AutonomyProposalRule: &auty.AutonomyProposalRule{},
} }
cur.Address = req.Addr cur.Address = req.Addr
cur.Status = req.Status cur.Status = req.Status
cur.Height = req.Height cur.Height = req.Height
cur.Index = req.Index cur.Index = req.Index
prefix, err := cur.Get(indexName) prefix, err := cur.Get(indexName)
rows, err := query.ListIndex(indexName, prefix, primary, req.Count, req.Direction) rows, err := query.ListIndex(indexName, prefix, primary, req.Count, req.Direction)
......
...@@ -7,13 +7,13 @@ package executor ...@@ -7,13 +7,13 @@ package executor
import ( import (
"testing" "testing"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/system/dapp" "github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
"github.com/33cn/chain33/util" "github.com/33cn/chain33/util"
auty "github.com/33cn/plugin/plugin/dapp/autonomy/types" auty "github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/33cn/chain33/common/db" "github.com/stretchr/testify/require"
) )
func TestExecLocalRule(t *testing.T) { func TestExecLocalRule(t *testing.T) {
...@@ -313,7 +313,7 @@ func TestListProposalRule(t *testing.T) { ...@@ -313,7 +313,7 @@ func TestListProposalRule(t *testing.T) {
Status: auty.AutonomyStatusProposalRule, Status: auty.AutonomyStatusProposalRule,
Count: 10, Count: 10,
Direction: 0, Direction: 0,
Height: height, Height: height,
Index: index, Index: index,
} }
rsp, err = au.listProposalRule(req) rsp, err = au.listProposalRule(req)
...@@ -483,4 +483,4 @@ func TestListProposalComment(t *testing.T) { ...@@ -483,4 +483,4 @@ func TestListProposalComment(t *testing.T) {
require.Equal(t, rsp.(*auty.ReplyQueryProposalComment).RltCmt[0].Index, int32(testcase2[1].index)) require.Equal(t, rsp.(*auty.ReplyQueryProposalComment).RltCmt[0].Index, int32(testcase2[1].index))
require.Equal(t, rsp.(*auty.ReplyQueryProposalComment).RltCmt[1].Height, testcase2[0].height) require.Equal(t, rsp.(*auty.ReplyQueryProposalComment).RltCmt[1].Height, testcase2[0].height)
require.Equal(t, rsp.(*auty.ReplyQueryProposalComment).RltCmt[1].Index, int32(testcase2[0].index)) require.Equal(t, rsp.(*auty.ReplyQueryProposalComment).RltCmt[1].Index, int32(testcase2[0].index))
} }
\ No newline at end of file
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
"github.com/33cn/chain33/common/db" "github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/table" "github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
auty "github.com/33cn/plugin/plugin/dapp/autonomy/types" auty "github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/33cn/chain33/system/dapp"
) )
/* /*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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