mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
GetID to return clientId in base64 form (#771)
Signed-off-by: Krishnasuri Narayanam <knaraya3@in.ibm.com> Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com> Co-authored-by: Arnaud J Le Hors <lehors@us.ibm.com>
This commit is contained in:
parent
21361ae7b4
commit
2c831e4590
1 changed files with 2 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
"encoding/json"
|
||||
"os"
|
||||
"testing"
|
||||
"encoding/base64"
|
||||
|
||||
"github.com/hyperledger/fabric-chaincode-go/pkg/cid"
|
||||
"github.com/hyperledger/fabric-chaincode-go/shim"
|
||||
|
|
@ -368,7 +369,7 @@ func prepMocks(orgMSP, clientId string) (*mocks.TransactionContext, *mocks.Chain
|
|||
|
||||
clientIdentity := &mocks.ClientIdentity{}
|
||||
clientIdentity.GetMSPIDReturns(orgMSP, nil)
|
||||
clientIdentity.GetIDReturns(clientId, nil)
|
||||
clientIdentity.GetIDReturns(base64.StdEncoding.EncodeToString([]byte(clientId)), nil)
|
||||
// set matching msp ID using peer shim env variable
|
||||
os.Setenv("CORE_PEER_LOCALMSPID", orgMSP)
|
||||
transactionContext.GetClientIdentityReturns(clientIdentity)
|
||||
|
|
|
|||
Loading…
Reference in a new issue