Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
fabric-sdk-go
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘星星@五瓣科技
fabric-sdk-go
Commits
3ad20db5
Commit
3ad20db5
authored
Feb 28, 2020
by
刘星星@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify test function
parent
aebe804a
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
81 deletions
+69
-81
workspace.xml
.idea/workspace.xml
+62
-74
gongxianghuicc_test.go
fabric-sdk-test/gongxianghuicc_test.go
+7
-7
No files found.
.idea/workspace.xml
View file @
3ad20db5
This diff is collapsed.
Click to expand it.
fabric-sdk-test/gongxianghuicc_test.go
View file @
3ad20db5
...
...
@@ -26,7 +26,7 @@ func TestCcQuery(t *testing.T) {
//}
}
var
input
=
`
{"id":"1","aname":"aaa","atype":"aaa","alinkman":"cc","aader":"aader","amob":"1234567890","backup":{"id":"1","aname":"alibusi","atype":"type","alinkman":"aaa","aader":"aader","amob":"1234567890"}}
`
var
input
=
`
[{"id":"1","aname":"aaa","atype":"aaa","alinkman":"cc","aader":"aader","amob":"1234567890","backup":{"id":"1","aname":"alibusi","atype":"type","alinkman":"aaa","aader":"aader","amob":"1234567890"}}]
`
var
inputUp
=
`{"id":"1","aname":"bbb","atype":"ccc","backup":{"id":"33","aname":"ertyui","atype":"cvghjui","alinkman":"aaa","amob":"33333333333"}}`
func
TestCcInvoke
(
t
*
testing
.
T
)
{
fmt
.
Println
(
"===================================put schema===================================================="
)
...
...
@@ -120,7 +120,7 @@ error message: GetSchema data fail,please check your parameters
解决方法,先执行对应表结构的Schema put操作
*/
func
TestSchemaPut
(
t
*
testing
.
T
){
resSchema
,
errSchema
:=
CcInvoke
(
"mycc"
,
"schema"
,[][]
byte
{[]
byte
(
"put"
),[]
byte
(
"alibusi"
),[]
byte
(
input
)})
resSchema
,
errSchema
:=
CcInvoke
(
"mycc"
,
"schema"
,[][]
byte
{[]
byte
(
"put"
),[]
byte
(
"alibusi
2
"
),[]
byte
(
input
)})
if
errSchema
!=
nil
{
fmt
.
Println
(
"CcInvoke execute err: "
,
errSchema
)
}
else
{
...
...
@@ -129,7 +129,7 @@ func TestSchemaPut(t *testing.T){
}
func
TestSchemaGet
(
t
*
testing
.
T
){
resSchema
,
errSchema
:=
CcQuery
(
"mycc"
,
"schema"
,[][]
byte
{[]
byte
(
"get"
),[]
byte
(
"alibusi"
)})
resSchema
,
errSchema
:=
CcQuery
(
"mycc"
,
"schema"
,[][]
byte
{[]
byte
(
"get"
),[]
byte
(
"alibusi
2
"
)})
if
errSchema
!=
nil
{
fmt
.
Println
(
"CcQuery execute err: "
,
errSchema
)
}
else
{
...
...
@@ -141,7 +141,7 @@ func TestSchemaGet(t *testing.T){
update Schema 只对新数据格式是否符合map[string]interface{} 的格式,以及更新的数据是否存在
*/
func
TestSchemaUpdate
(
t
*
testing
.
T
){
resSchema
,
errSchema
:=
CcInvoke
(
"mycc"
,
"schema"
,[][]
byte
{[]
byte
(
"
get"
),[]
byte
(
"alibusi
"
),[]
byte
(
input
)})
resSchema
,
errSchema
:=
CcInvoke
(
"mycc"
,
"schema"
,[][]
byte
{[]
byte
(
"
update"
),[]
byte
(
"alibusi2
"
),[]
byte
(
input
)})
if
errSchema
!=
nil
{
fmt
.
Println
(
"CcInvoke execute err: "
,
errSchema
)
}
else
{
...
...
@@ -152,7 +152,7 @@ func TestSchemaUpdate(t *testing.T){
----------------------------------------------------------Data Operation------------------------------------------------------------
*/
func
TestDataPut
(
t
*
testing
.
T
){
resSchema
,
errSchema
:=
CcInvoke
(
"mycc"
,
"
schema"
,[][]
byte
{[]
byte
(
"put"
),[]
byte
(
"alibusi
"
),[]
byte
(
input
)})
resSchema
,
errSchema
:=
CcInvoke
(
"mycc"
,
"
put"
,[][]
byte
{[]
byte
(
"alibusi2
"
),[]
byte
(
input
)})
if
errSchema
!=
nil
{
fmt
.
Println
(
"CcInvoke execute err: "
,
errSchema
)
}
else
{
...
...
@@ -161,7 +161,7 @@ func TestDataPut(t *testing.T){
}
func
TestDataGet
(
t
*
testing
.
T
){
resSchema
,
errSchema
:=
CcQuery
(
"mycc"
,
"
schema"
,[][]
byte
{[]
byte
(
"get"
),[]
byte
(
"alibusi
"
),[]
byte
(
`{"id":"1"}`
)})
resSchema
,
errSchema
:=
CcQuery
(
"mycc"
,
"
get"
,[][]
byte
{[]
byte
(
"alibusi2
"
),[]
byte
(
`{"id":"1"}`
)})
if
errSchema
!=
nil
{
fmt
.
Println
(
"CcQuery execute err: "
,
errSchema
)
}
else
{
...
...
@@ -170,7 +170,7 @@ func TestDataGet(t *testing.T){
}
func
TestDataUpdate
(
t
*
testing
.
T
){
resSchema
,
errSchema
:=
CcInvoke
(
"mycc"
,
"
schema"
,[][]
byte
{[]
byte
(
"get"
),[]
byte
(
"alibusi
"
),[]
byte
(
inputUp
)})
resSchema
,
errSchema
:=
CcInvoke
(
"mycc"
,
"
update"
,[][]
byte
{[]
byte
(
"alibusi2
"
),[]
byte
(
inputUp
)})
if
errSchema
!=
nil
{
fmt
.
Println
(
"CcInvoke execute err: "
,
errSchema
)
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment