-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I9afe80529c1fe3f1b86f28d4507968a019a198b2 Signed-off-by: 乔伦 徐 <jamesxql@gmail.com>
- Loading branch information
Showing
11 changed files
with
189 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package msp | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/hyperledger/fabric-sdk-go/test/integration" | ||
) | ||
|
||
func TestGetCAInfo(t *testing.T) { | ||
mspClient, sdk := setupClient(t) | ||
defer integration.CleanupUserData(t, sdk) | ||
|
||
resp, err := mspClient.GetCAInfo() | ||
if err != nil { | ||
t.Fatalf("Get CAInfo failed: %s", err) | ||
} | ||
if resp.CAName != "ca.org1.example.com" { | ||
t.Fatalf("Name should be 'ca.org1.example.com'") | ||
} | ||
|
||
if resp.CAChain == nil { | ||
t.Fatalf("CAChain shouldn't be nil") | ||
} | ||
t.Logf("CAChain: %+v", resp.CAChain) | ||
|
||
if resp.IssuerPublicKey == nil { | ||
t.Fatalf("IssuerPublicKey shouldn't be nil") | ||
} | ||
t.Logf("IssuerPublicKey: %+v", resp.IssuerPublicKey) | ||
|
||
if resp.Version == "" { | ||
t.Fatalf("Version shouldn't be empty") | ||
} | ||
t.Logf("Version: %+v", resp.Version) | ||
} |