Commit ef8a3fae authored by Georg Mittendorfer's avatar Georg Mittendorfer

Fix system integration tests (again).

parent dccfb00e
......@@ -182,8 +182,8 @@ public class IriApiHandlerCommandsSysIT {
@Test
public void givenBroadcastTransactionsWhenPostThenOk() {
ResponseHashes tips = postCommandExpectOk(command("getTips"), ResponseHashes.class); // get random transactions
ResponseTrytes responseTrytes = postCommandExpectOk(getTrytes(tips.getHashes().get(0)), ResponseTrytes.class); // convert to trytes
NodeInfo nodeInfo = postCommandExpectOk(command(GET_NODE_INFO.getKey()), NodeInfo.class);
ResponseTrytes responseTrytes = postCommandExpectOk(getTrytes(nodeInfo.getLatestSolidSubtangleMilestone()), ResponseTrytes.class); // convert to trytes
String trytes = responseTrytes.getTrytes().get(0);
String result = postCommandExpectOk(broadcastTransactions(trytes));
assertTrue(result, result.contains("duration"));
......@@ -191,8 +191,8 @@ public class IriApiHandlerCommandsSysIT {
@Test
public void givenStoreTransactionsWhenPostThenOk() {
ResponseHashes tips = postCommandExpectOk(command("getTips"), ResponseHashes.class); // get random transactions
ResponseTrytes responseTrytes = postCommandExpectOk(getTrytes(tips.getHashes().get(0)), ResponseTrytes.class); // convert to trytes
NodeInfo nodeInfo = postCommandExpectOk(command(GET_NODE_INFO.getKey()), NodeInfo.class);
ResponseTrytes responseTrytes = postCommandExpectOk(getTrytes(nodeInfo.getLatestSolidSubtangleMilestone()), ResponseTrytes.class); // convert to trytes
String trytes = responseTrytes.getTrytes().get(0);
String result = postCommandExpectOk(storeTransactions(trytes));
assertTrue(result, result.contains("duration"));
......@@ -207,13 +207,8 @@ public class IriApiHandlerCommandsSysIT {
@Test
public void givenCheckConsistencyWhenPostThenOk() {
ResponseHashes tips = util.postCommand(command("getTips"))
.expectStatus().isOk()
.expectBody(ResponseHashes.class).returnResult().getResponseBody();
assert tips != null && tips.getHashes() != null;
String tail = tips.getHashes().get(0);
// String tail = "MFGXY9RYV9NSIZTBMCLTUFCDGKJ9GUXJEZPDLAXKPKVBXXKAURSMXTKTECSXYLOWWTMBQAZZKZUXZ9999";
String result = postCommandExpectOk(checkConsistency(tail));
NodeInfo nodeInfo = postCommandExpectOk(command(GET_NODE_INFO.getKey()), NodeInfo.class);
String result = postCommandExpectOk(checkConsistency(nodeInfo.getLatestSolidSubtangleMilestone()));
assertTrue(result, result.startsWith("{\"state\":")); // could be false, too. in case of max depth, ...
}
......
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