Skip to content

Commit

Permalink
Merge pull request #17 from bitbeen/master
Browse files Browse the repository at this point in the history
update test method  updateIdentity
  • Loading branch information
kaifei Hu authored Nov 10, 2021
2 parents 6028f6d + 6f5503f commit ae0ee51
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/test/java/irita/sdk/module/identity/IdentityClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public void init() {



String nodeUri = "http://10.1.4.236:26657";
String grpcAddr = "http://10.1.4.236:9090";
String nodeUri = "http://127.0.0.1:26657";
String grpcAddr = "http://127.0.0.1:9090";
String chainId = "test";
ClientConfig clientConfig = new ClientConfig(nodeUri, grpcAddr, chainId);
// OpbConfig opbConfig = new OpbConfig("", "", "");
Expand All @@ -65,10 +65,11 @@ public void init() {
void createIdentity() {
try {
String str = ByteUtils.getRandomStr(16);
String id=Hex.toHexString(str.getBytes(StandardCharsets.UTF_8));
//String id=Hex.toHexString(str.getBytes(StandardCharsets.UTF_8));
String id="37644773453030353876796753344436";
System.out.println(id);
identityClient.createIdentity(id,
"53281ce4ba0b8c97e5b1434f8f298b064f03d4c1d21aae9276065e170fc90a5d51",
"53281ce4ba0b8c97e5b1434f8f298b064f03d4c1d21aae9276065e170fc90a5d52",
IdentityOuterClass.PubKeyAlgorithm.SM2.name(),
"", "https://security.com/kyc/10001/", baseTx);
} catch (Exception e) {
Expand All @@ -79,7 +80,7 @@ void createIdentity() {
@Test
void updateIdentity() {
try {
identityClient.updateIdentity("37644773453030353876796753344436","788877777", IdentityOuterClass.PubKeyAlgorithm.SM2.name(), "https://security.com/kyc/10001/","",baseTx);
identityClient.updateIdentity("37644773453030353876796753344436","53281ce4ba0b8c97e5b1434f8f298b064f03d4c1d21aae9276065e170fc90a5d58", IdentityOuterClass.PubKeyAlgorithm.SM2.name(), "","https://security.com/kyc/10001/",baseTx);
}catch (Exception e){
e.printStackTrace();
}
Expand Down

0 comments on commit ae0ee51

Please sign in to comment.