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
015d159a
Commit
015d159a
authored
Feb 28, 2020
by
刘星星@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add gongxianghui_auth test code
parent
3ad20db5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
528 additions
and
152 deletions
+528
-152
workspace.xml
.idea/workspace.xml
+132
-133
config_e2e.yaml
fabric-sdk-go/test/fixtures/config/config_e2e.yaml
+4
-4
ccprovider_test.go
fabric-sdk-go/test/integration/e2e/ccprovider_test.go
+16
-15
gxhauth_test.go
fabric-sdk-test/gxhauth_test.go
+376
-0
No files found.
.idea/workspace.xml
View file @
015d159a
This diff is collapsed.
Click to expand it.
fabric-sdk-go/test/fixtures/config/config_e2e.yaml
View file @
015d159a
...
...
@@ -414,9 +414,9 @@ certificateAuthorities:
# Client key and cert for SSL handshake with Fabric CA
client
:
key
:
path
:
/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org1.example.com/users/User
2
@org1.example.com/tls/client.key
path
:
/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org1.example.com/users/User
1
@org1.example.com/tls/client.key
cert
:
path
:
/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org1.example.com/users/User
2
@org1.example.com/tls/client.crt
path
:
/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org1.example.com/users/User
1
@org1.example.com/tls/client.crt
# Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user, a.k.a registrar, is
# needed to enroll and invoke new users.
...
...
@@ -433,9 +433,9 @@ certificateAuthorities:
# Client key and cert for SSL handshake with Fabric CA
client
:
key
:
path
:
/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org2.example.com/users/User
1
@org2.example.com/tls/client.key
path
:
/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org2.example.com/users/User
2
@org2.example.com/tls/client.key
cert
:
path
:
/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org2.example.com/users/User
1
@org2.example.com/tls/client.crt
path
:
/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org2.example.com/users/User
2
@org2.example.com/tls/client.crt
# Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user, a.k.a registrar, is
# needed to enroll and invoke new users.
...
...
fabric-sdk-go/test/integration/e2e/ccprovider_test.go
View file @
015d159a
...
...
@@ -49,12 +49,12 @@ func TestInstallCc(t *testing.T){
orgName
:=
"Org1"
//chaincodePath:="github.com/example_cc"
//goPath := "/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/test/fixtures/testdata/src"
chaincodePath
:=
"github.com/gongxianghui"
chaincodePath
:=
"github.com/gongxianghui
_auth
"
goPath
:=
"/opt/gopath/src/github.com/hyperledger/chaincode"
peerFilter
:=
&
PeerFilter
{
URl
:
[]
string
{
"39.98.194.244:7151"
}}
ccID
:=
"gongxianghui"
version
:=
"
1
"
installCc
(
userName
,
orgName
,
chaincodePath
,
goPath
,
ccID
,
version
,
peerFilter
)
//
peerFilter := &PeerFilter{URl:[]string{"39.98.194.244:7151"}}
ccID
:=
"gongxianghui
_auth
"
version
:=
"
2.0
"
installCc
(
userName
,
orgName
,
chaincodePath
,
goPath
,
ccID
,
version
,
nil
)
}
func
TestInstantiateCc
(
t
*
testing
.
T
){
...
...
@@ -62,20 +62,21 @@ func TestInstantiateCc(t *testing.T){
orgName
:=
"Org1"
//chaincodePath:="github.com/example_cc"
//goPath := "/opt/gopath/src/github.com/fabric-sdk-sample/fabric-sdk-go/test/fixtures/testdata/src"
chaincodePath
:=
"github.com/gongxianghui"
chaincodePath
:=
"github.com/gongxianghui
_auth
"
//goPath:= "/opt/gopath/src/github.com/hyperledger/chaincode"
peerFilter
:=
&
PeerFilter
{
URl
:
[]
string
{
"39.98.194.244:7251"
}}
ccID
:=
"gongxianghui"
version
:=
"
1
"
instantiateCc
(
userName
,
orgName
,
chaincodePath
,
ccID
,
version
,
nil
,
nil
,
peerFilter
)
//
peerFilter := &PeerFilter{URl:[]string{"39.98.194.244:7251"}}
ccID
:=
"gongxianghui
_auth
"
version
:=
"
2.0
"
instantiateCc
(
userName
,
orgName
,
chaincodePath
,
ccID
,
version
,
nil
,
nil
,
nil
)
}
func
TestUpgradeCc
(
t
*
testing
.
T
){
userName
:=
"Admin"
orgName
:=
"Org1"
chaincodePath
:=
"gongxianghui"
peerFilter
:=
&
PeerFilter
{
URl
:
[]
string
{
"39.98.194.244:7251"
}}
ccID
:=
"testCC"
version
:=
"0"
upgradeCc
(
userName
,
orgName
,
chaincodePath
,
ccID
,
version
,
nil
,
nil
,
peerFilter
)
chaincodePath
:=
"github.com/gongxianghui_auth"
//goPath:= "/opt/gopath/src/github.com/hyperledger/chaincode"
//peerFilter := &PeerFilter{URl:[]string{"39.98.194.244:7251"}}
ccID
:=
"gongxianghui_auth"
version
:=
"2.0"
upgradeCc
(
userName
,
orgName
,
chaincodePath
,
ccID
,
version
,
nil
,
nil
,
nil
)
}
\ No newline at end of file
fabric-sdk-test/gxhauth_test.go
0 → 100644
View file @
015d159a
This diff is collapsed.
Click to expand it.
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