add gongxianghui_auth test code

parent 3ad20db5
This diff is collapsed.
......@@ -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/User2@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/User1@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/User2@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/User1@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/User1@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/User2@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/User1@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/User2@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.
......
......@@ -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
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