Skip to content

Commit

Permalink
Merge pull request #79 from ground-x/release/v1.1.1
Browse files Browse the repository at this point in the history
[Master] release/v1.1.1 QA Sign-off
  • Loading branch information
kale authored Jun 14, 2021
2 parents f535739 + 4486461 commit b28052f
Show file tree
Hide file tree
Showing 3 changed files with 180 additions and 142 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ workflows:
<<: *test_steps
name: publish_rc
- publish_android:
requires:
- publish_rc
<<: *stage_rc
<<: *test_steps
name: publish_android_rc
Expand All @@ -195,6 +197,8 @@ workflows:
<<: *test_steps
name: publish_prod
- publish_android:
requires:
- publish_prod
<<: *stage_prod
<<: *test_steps
name: publish_android_prod
Expand Down
32 changes: 23 additions & 9 deletions src/test/java/xyz/groundx/caver_ext_kas/kas/kip17/KIP17Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.klaytn.caver.transaction.response.PollingTransactionReceiptProcessor;
import com.klaytn.caver.transaction.response.TransactionReceiptProcessor;
import com.squareup.okhttp.Call;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
Expand Down Expand Up @@ -80,14 +81,14 @@ public static void init() throws Exception {

caver.kas.kip17.getApiClient().setDebugging(true);
prepareKIP17Contract();


}


@Test
public void deploy() throws ApiException {
public void deploy() throws ApiException, InterruptedException {
Kip17TransactionStatusResponse response = caver.kas.kip17.deploy("KIP17", "KCT17", "kk-" + new Date().getTime());
assertNotNull(response);
Thread.sleep(5000);
}

@Test
Expand Down Expand Up @@ -119,6 +120,8 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
fail();
} else {
assertNotNull(future.get());
Thread.sleep(5000);

}
}

Expand Down Expand Up @@ -225,14 +228,15 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
}

@Test
public void mint() throws ApiException {
public void mint() throws ApiException, InterruptedException {
String to = account;
String id = Numeric.toHexStringWithPrefix(BigInteger.valueOf(new Date().getTime()));
String uri = "https://test.com";

Kip17TransactionStatusResponse response = caver.kas.kip17.mint(testContractAlias, to, id, uri);

assertNotNull(response);

Thread.sleep(5000);
}

@Test
Expand Down Expand Up @@ -268,6 +272,7 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
fail();
} else {
assertNotNull(future.get());
Thread.sleep(5000);
}
}

Expand Down Expand Up @@ -372,13 +377,14 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
}

@Test
public void transfer() throws ApiException, IOException, TransactionException {
public void transfer() throws ApiException, IOException, TransactionException, InterruptedException {
BigInteger tokenId = BigInteger.valueOf(new Date().getTime());
mintToken(testContractAlias, account, tokenId);
String to = caver.kas.wallet.createAccount().getAddress();

Kip17TransactionStatusResponse response = caver.kas.kip17.transfer(testContractAlias, account, account, to, tokenId);
assertNotNull(response);
Thread.sleep(5000);
}

@Test
Expand Down Expand Up @@ -415,16 +421,18 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
fail();
} else {
assertNotNull(future.get());
Thread.sleep(5000);
}
}

@Test
public void burn() throws ApiException, IOException, TransactionException {
public void burn() throws ApiException, IOException, TransactionException, InterruptedException {
BigInteger id = BigInteger.valueOf(new Date().getTime());
mintToken(testContractAlias, account, id);

Kip17TransactionStatusResponse burnResponse = caver.kas.kip17.burn(testContractAlias, account, id);
assertNotNull(burnResponse);
Thread.sleep(5000);
}

@Test
Expand Down Expand Up @@ -460,16 +468,19 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
fail();
} else {
assertNotNull(future.get());
Thread.sleep(5000);
}
}

@Test
public void approve() throws ApiException {
public void approve() throws ApiException, InterruptedException {
String from = account;
String to = caver.kas.wallet.createAccount().getAddress();

Kip17TokenListResponse res = caver.kas.kip17.getTokenList(testContractAlias);
Kip17TransactionStatusResponse response = caver.kas.kip17.approve(testContractAlias, from, to, res.getItems().get(0).getTokenId());
assertNotNull(response);
Thread.sleep(5000);
}

@Test
Expand Down Expand Up @@ -506,16 +517,18 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
fail();
} else {
assertNotNull(completableFuture.get());
Thread.sleep(5000);
}
}

@Test
public void approveAll() throws ApiException, IOException, TransactionException {
public void approveAll() throws ApiException, InterruptedException {
String from = caver.kas.wallet.createAccount().getAddress();
String to = caver.kas.wallet.createAccount().getAddress();

Kip17TransactionStatusResponse response = caver.kas.kip17.approveAll(testContractAlias, from, to, true);
assertNotNull(response);
Thread.sleep(5000);
}

@Test
Expand Down Expand Up @@ -551,6 +564,7 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
fail();
} else {
assertNotNull(future.get());
Thread.sleep(5000);
}
}

Expand Down
Loading

0 comments on commit b28052f

Please sign in to comment.