Commit 8313afb5 authored by Georg Mittendorfer's avatar Georg Mittendorfer

Improve SysIT.

parent 5c2c4fee
Pipeline #44894965 passed with stage
in 3 minutes and 3 seconds
......@@ -25,8 +25,9 @@ import com.mio.piri.commands.*;
import com.mio.piri.commands.response.NodeInfo;
import com.mio.piri.metrics.MeterFactory;
import com.mio.piri.util.IriClientTestUtility;
import com.mio.piri.util.ResponseHashes;
import com.mio.piri.util.responses.ResponseHashes;
import com.mio.piri.util.responses.GetTransactionsToApproveResponse;
import com.mio.piri.util.responses.ResponseTrytes;
import io.micrometer.core.instrument.Timer;
import org.assertj.core.api.Assertions;
import org.junit.Before;
......@@ -181,16 +182,16 @@ public class IriApiHandlerCommandsSysIT {
@Test
public void givenBroadcastTransactionsWhenPostThenOk() {
// test might fail after snapshot. fix generating trytes (do ATT for example).
String trytes = "CCWCXCGDEAGDDDPCADEAKDPCGDEARCFDTCPCHDTCSCEAQCMDEACCMDDDDDXCHAXACBUA9BSAEASBUCEAMDCDIDEAKDCDID9DSCEA9DXCZCTCEAHDCDEAVCTCHDEAXCBDEARCCDBDHDPCRCHDEAKDXCHDWCEAADTCEADD9DTCPCGDTCEAPCSCSCEAADTCEACDBDEANBXCGDRCCDFDSCQAEACDFDEATCADPCXC9DEAADTCEAPCHDEACCMDDDDDXCJBXCCDHDPCWCCDGDHDXCBDVCSACDFDVCSAEACCWCXCGDEAGDDDPCADEAKDPCGDEARCFDTCPCHDTCSCEAIDGDXCBDVCEAHDWCTCEAXCCDHDPCGDDDPCADSARCCDADEAGDDDPCADADTCFDEAXCBDEACDUCUC9DXCBDTCEAADCDSCTCQAEAHDWCTCFDTCUCCDFDTCEASBEAPCADEABDCDHDEAFDTCRCXCTCJDXCBDVCEAFDTCKDPCFDSCGDEAUCCDFDEAHDWCXCGDEAGDDDPCADSAEASBCDHDPCGDDDPCADSARCCDADEAKDXC9D9DEAFDTCGDIDADTCEAKDWCTCBDEAHDWCTCEAHDPCBDVC9DTCEARCPCBDEAWCPCBDSC9DTCEAHDWCTCEA9DCDPCSCSAJ9J9LAWBYBBCRBSBEAWBYBBCRBSBQAEACCOBACDCWBSBEANBOBBCDCLAJ9J9WBCDGDWCXCEAWBCDGDWCXCQAEACCTCFDIDADXCEANBTCGDIDEAMAEAEAEAEAEAEAEAEAEAEAEAQAEA9DXCHDSAEAGARBTC9D9DCDQAEACCWCXCGDEAXCGDEACCTCFDIDADXCGANAEAXCGDEAPCEATBPCDDPCBDTCGDTCEAADPCBDVCPCEAGDTCFDXCTCGDEAQCMDEAOBHDGDIDZCCDEAWBXCNDIDGDPCKDPCSAEASBHDEAWCPCGDEAQCTCTCBDEAGDTCFDXCPC9DXCNDTCSCEAXCBDEABCWCCDVCPCZCIDZCPCBDLAGDEAGDTCXCBDTCBDEAADPCBDVCPCEAADPCVCPCNDXCBDTCEALBXCVCEAMBCDADXCRCEABCDDXCFDXCHDGDEAQCTCHDKDTCTCBDEAWBPCFDRCWCEAWAUAVA9BEAPCBDSCEAPBTCQCFDIDPCFDMDEAWAUAVABBEAPCBDSCEAWCPCGDEAQCTCTCBDEARCCD9D9DTCRCHDTCSCEAXCBDEAPCEAGDXCBDVC9DTCEAHDPCBDZCEAQCCDBDEAJDCD9DIDADTCSAEAKBBDEAPCBDXCADTCEAPCSCPCDDHDPCHDXCCDBDEAWCPCGDEAQCTCTCBDEAPCBDBDCDIDBDRCTCSCSAJ9J9J9GBGBEAACTCUCTCFDTCBDRCTCGDSASASAEAGBGB9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999OFFLINE9SPAM9ADDRESS99999999999999999999999999999999999999999999999999999999TYPPI999999999999999999999999999AGUASPAM9DOT9COM9999TYPPI99DIYKIYD99999999999999999999FCJKIUHWJEGWDJBWEGOQNDCXNIHWVACQICUKG9KWJLHDQ9DXILKBBQJBOKLDUNXPNOHVKHPCCJGZCEAZCIILOREWNQ9XBRGFVCSCWPFPUEUCRHVHKDXUDGX9RAJFF9IMHZKOWTFQWCPZVGAHXNZSPLLGZXLFPZ9999L9R9E9WXKHLWLGS9VYY99KDLPPV9XDZB9YMQILBUE9VVHAI9GOWHRNEPZGXNNYWMTQUONDGAJYIWZ9999IOTASPAM9DOT9COM9999TYPPI999HB9JWUME999999999MMMMMMMMMPOWSRVIO9KW99999LGVMEVKMMMM";
ResponseTrytes responseTrytes = postCommandExpectOk(getTrytes("LAZZPOJXCVBKLYJJNMWC9IYPYBKBCUVEDMJOCJZZRSCPEIWA9TVQLCXMVWGSYMVDMSI9LSMKH9DMZ9999"), ResponseTrytes.class);
String trytes = responseTrytes.getTrytes().get(0);
String result = postCommandExpectOk(broadcastTransactions(trytes));
assertTrue(result, result.contains("duration"));
}
@Test
public void givenStoreTransactionsWhenPostThenOk() {
// test might fail after snapshot. fix generating trytes (do ATT for example).
String trytes = "CCWCXCGDEAGDDDPCADEAKDPCGDEARCFDTCPCHDTCSCEAQCMDEACCMDDDDDXCHAXACBUA9BSAEASBUCEAMDCDIDEAKDCDID9DSCEA9DXCZCTCEAHDCDEAVCTCHDEAXCBDEARCCDBDHDPCRCHDEAKDXCHDWCEAADTCEADD9DTCPCGDTCEAPCSCSCEAADTCEACDBDEANBXCGDRCCDFDSCQAEACDFDEATCADPCXC9DEAADTCEAPCHDEACCMDDDDDXCJBXCCDHDPCWCCDGDHDXCBDVCSACDFDVCSAEACCWCXCGDEAGDDDPCADEAKDPCGDEARCFDTCPCHDTCSCEAIDGDXCBDVCEAHDWCTCEAXCCDHDPCGDDDPCADSARCCDADEAGDDDPCADADTCFDEAXCBDEACDUCUC9DXCBDTCEAADCDSCTCQAEAHDWCTCFDTCUCCDFDTCEASBEAPCADEABDCDHDEAFDTCRCXCTCJDXCBDVCEAFDTCKDPCFDSCGDEAUCCDFDEAHDWCXCGDEAGDDDPCADSAEASBCDHDPCGDDDPCADSARCCDADEAKDXC9D9DEAFDTCGDIDADTCEAKDWCTCBDEAHDWCTCEAHDPCBDVC9DTCEARCPCBDEAWCPCBDSC9DTCEAHDWCTCEA9DCDPCSCSAJ9J9LAWBYBBCRBSBEAWBYBBCRBSBQAEACCOBACDCWBSBEANBOBBCDCLAJ9J9WBCDGDWCXCEAWBCDGDWCXCQAEACCTCFDIDADXCEANBTCGDIDEAMAEAEAEAEAEAEAEAEAEAEAEAQAEA9DXCHDSAEAGARBTC9D9DCDQAEACCWCXCGDEAXCGDEACCTCFDIDADXCGANAEAXCGDEAPCEATBPCDDPCBDTCGDTCEAADPCBDVCPCEAGDTCFDXCTCGDEAQCMDEAOBHDGDIDZCCDEAWBXCNDIDGDPCKDPCSAEASBHDEAWCPCGDEAQCTCTCBDEAGDTCFDXCPC9DXCNDTCSCEAXCBDEABCWCCDVCPCZCIDZCPCBDLAGDEAGDTCXCBDTCBDEAADPCBDVCPCEAADPCVCPCNDXCBDTCEALBXCVCEAMBCDADXCRCEABCDDXCFDXCHDGDEAQCTCHDKDTCTCBDEAWBPCFDRCWCEAWAUAVA9BEAPCBDSCEAPBTCQCFDIDPCFDMDEAWAUAVABBEAPCBDSCEAWCPCGDEAQCTCTCBDEARCCD9D9DTCRCHDTCSCEAXCBDEAPCEAGDXCBDVC9DTCEAHDPCBDZCEAQCCDBDEAJDCD9DIDADTCSAEAKBBDEAPCBDXCADTCEAPCSCPCDDHDPCHDXCCDBDEAWCPCGDEAQCTCTCBDEAPCBDBDCDIDBDRCTCSCSAJ9J9J9GBGBEAACTCUCTCFDTCBDRCTCGDSASASAEAGBGB9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999OFFLINE9SPAM9ADDRESS99999999999999999999999999999999999999999999999999999999TYPPI999999999999999999999999999AGUASPAM9DOT9COM9999TYPPI99DIYKIYD99999999999999999999FCJKIUHWJEGWDJBWEGOQNDCXNIHWVACQICUKG9KWJLHDQ9DXILKBBQJBOKLDUNXPNOHVKHPCCJGZCEAZCIILOREWNQ9XBRGFVCSCWPFPUEUCRHVHKDXUDGX9RAJFF9IMHZKOWTFQWCPZVGAHXNZSPLLGZXLFPZ9999L9R9E9WXKHLWLGS9VYY99KDLPPV9XDZB9YMQILBUE9VVHAI9GOWHRNEPZGXNNYWMTQUONDGAJYIWZ9999IOTASPAM9DOT9COM9999TYPPI999HB9JWUME999999999MMMMMMMMMPOWSRVIO9KW99999LGVMEVKMMMM";
ResponseTrytes responseTrytes = postCommandExpectOk(getTrytes("LAZZPOJXCVBKLYJJNMWC9IYPYBKBCUVEDMJOCJZZRSCPEIWA9TVQLCXMVWGSYMVDMSI9LSMKH9DMZ9999"), ResponseTrytes.class);
String trytes = responseTrytes.getTrytes().get(0);
String result = postCommandExpectOk(storeTransactions(trytes));
assertTrue(result, result.contains("duration"));
}
......
/*
* Copyright (c) 2018.
* Copyright (c) 2019.
*
* This file is part of Piri.
*
......@@ -17,7 +17,7 @@
* License along with Piri. If not, see <http://www.gnu.org/licenses/>.
*/
package com.mio.piri.util;
package com.mio.piri.util.responses;
import lombok.Getter;
......
/*
* Copyright (c) 2019.
*
* This file is part of Piri.
*
* Piri is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* Piri is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
* the GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with Piri. If not, see <http://www.gnu.org/licenses/>.
*/
package com.mio.piri.util.responses;
import lombok.Getter;
import java.util.List;
public class ResponseTrytes {
@Getter
private List<String> trytes;
}
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