mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-03 10:46:54 +01:00
xRemove hardcoding of enableBisqDebugging in ApiTest
Remove hardcoding of value to prevent it being set as a command line option that then overides the option being set from apitest.properties file preventing it from being altered without altering code. Redundant as false is the default.
This commit is contained in:
parent
c8c256f958
commit
6026e6fb78
13 changed files with 4 additions and 34 deletions
|
@ -87,8 +87,7 @@ public class ApiTestCase {
|
|||
throws InterruptedException, ExecutionException, IOException {
|
||||
String[] params = new String[]{
|
||||
"--supportingApps", stream(supportingApps).map(Enum::name).collect(Collectors.joining(",")),
|
||||
"--callRateMeteringConfigPath", getTestRateMeterInterceptorConfig().getAbsolutePath(),
|
||||
"--enableBisqDebugging", "false"
|
||||
"--callRateMeteringConfigPath", getTestRateMeterInterceptorConfig().getAbsolutePath()
|
||||
};
|
||||
setUpScaffold(params);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,6 @@ public class CallRateMeteringInterceptorTest extends MethodTest {
|
|||
@BeforeAll
|
||||
public static void setUp() {
|
||||
startSupportingApps(false,
|
||||
false,
|
||||
bitcoind, alicedaemon);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,13 +70,11 @@ public class MethodTest extends ApiTestCase {
|
|||
|
||||
public static void startSupportingApps(File callRateMeteringConfigFile,
|
||||
boolean generateBtcBlock,
|
||||
boolean startSupportingAppsInDebugMode,
|
||||
Enum<?>... supportingApps) {
|
||||
try {
|
||||
setUpScaffold(new String[]{
|
||||
"--supportingApps", toNameList.apply(supportingApps),
|
||||
"--callRateMeteringConfigPath", callRateMeteringConfigFile.getAbsolutePath(),
|
||||
"--enableBisqDebugging", startSupportingAppsInDebugMode ? "true" : "false"
|
||||
});
|
||||
doPostStartup(generateBtcBlock);
|
||||
} catch (Exception ex) {
|
||||
|
@ -84,16 +82,13 @@ public class MethodTest extends ApiTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
public static void startSupportingApps(boolean generateBtcBlock,
|
||||
boolean startSupportingAppsInDebugMode,
|
||||
Enum<?>... supportingApps) {
|
||||
public static void startSupportingApps(boolean generateBtcBlock, Enum<?>... supportingApps) {
|
||||
try {
|
||||
// Disable call rate metering where there is no callRateMeteringConfigFile.
|
||||
File callRateMeteringConfigFile = getTestRateMeterInterceptorConfig();
|
||||
setUpScaffold(new String[]{
|
||||
"--supportingApps", toNameList.apply(supportingApps),
|
||||
"--callRateMeteringConfigPath", callRateMeteringConfigFile.getAbsolutePath(),
|
||||
"--enableBisqDebugging", startSupportingAppsInDebugMode ? "true" : "false"
|
||||
"--callRateMeteringConfigPath", callRateMeteringConfigFile.getAbsolutePath()
|
||||
});
|
||||
doPostStartup(generateBtcBlock);
|
||||
} catch (Exception ex) {
|
||||
|
|
|
@ -77,12 +77,7 @@ public abstract class AbstractOfferTest extends MethodTest {
|
|||
|
||||
@BeforeAll
|
||||
public static void setUp() {
|
||||
setUp(false);
|
||||
}
|
||||
|
||||
public static void setUp(boolean startSupportingAppsInDebugMode) {
|
||||
startSupportingApps(true,
|
||||
startSupportingAppsInDebugMode,
|
||||
bitcoind,
|
||||
seednode,
|
||||
arbdaemon,
|
||||
|
|
|
@ -44,10 +44,6 @@ import static protobuf.OfferDirection.BUY;
|
|||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
public class BsqSwapOfferTest extends AbstractOfferTest {
|
||||
|
||||
@BeforeAll
|
||||
public static void setUp() {
|
||||
AbstractOfferTest.setUp(false);
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
public void generateBtcBlock() {
|
||||
|
|
|
@ -78,10 +78,6 @@ public class TakeBuyBTCOfferWithNationalBankAcctTest extends AbstractTradeTest {
|
|||
private static PaymentAccount alicesPaymentAccount;
|
||||
private static PaymentAccount bobsPaymentAccount;
|
||||
|
||||
@BeforeAll
|
||||
public static void setUp() {
|
||||
setUp(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(1)
|
||||
|
|
|
@ -60,7 +60,7 @@ public class TakeSellXMROfferTest extends AbstractTradeTest {
|
|||
|
||||
@BeforeAll
|
||||
public static void setUp() {
|
||||
AbstractOfferTest.setUp(false);
|
||||
AbstractOfferTest.setUp();
|
||||
createXmrPaymentAccounts();
|
||||
EXPECTED_PROTOCOL_STATUS.init();
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ public class BsqWalletTest extends MethodTest {
|
|||
@BeforeAll
|
||||
public static void setUp() {
|
||||
startSupportingApps(true,
|
||||
false,
|
||||
bitcoind,
|
||||
seednode,
|
||||
arbdaemon,
|
||||
|
|
|
@ -36,7 +36,6 @@ public class BtcTxFeeRateTest extends MethodTest {
|
|||
@BeforeAll
|
||||
public static void setUp() {
|
||||
startSupportingApps(false,
|
||||
true,
|
||||
bitcoind,
|
||||
seednode,
|
||||
alicedaemon);
|
||||
|
|
|
@ -41,7 +41,6 @@ public class BtcWalletTest extends MethodTest {
|
|||
@BeforeAll
|
||||
public static void setUp() {
|
||||
startSupportingApps(false,
|
||||
false,
|
||||
bitcoind,
|
||||
seednode,
|
||||
alicedaemon,
|
||||
|
|
|
@ -43,11 +43,6 @@ import bisq.apitest.method.offer.ValidateCreateOfferTest;
|
|||
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
|
||||
public class OfferTest extends AbstractOfferTest {
|
||||
|
||||
@BeforeAll
|
||||
public static void setUp() {
|
||||
setUp(false); // Use setUp(true) for running API daemons in remote debug mode.
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(1)
|
||||
public void testCreateOfferValidation() {
|
||||
|
|
|
@ -57,7 +57,6 @@ public class StartupTest extends MethodTest {
|
|||
try {
|
||||
callRateMeteringConfigFile = getTestRateMeterInterceptorConfig();
|
||||
startSupportingApps(callRateMeteringConfigFile,
|
||||
false,
|
||||
false,
|
||||
bitcoind, seednode, arbdaemon, alicedaemon);
|
||||
} catch (Exception ex) {
|
||||
|
|
|
@ -53,7 +53,6 @@ public class WalletTest extends MethodTest {
|
|||
@BeforeAll
|
||||
public static void setUp() {
|
||||
startSupportingApps(true,
|
||||
false,
|
||||
bitcoind,
|
||||
seednode,
|
||||
arbdaemon,
|
||||
|
|
Loading…
Add table
Reference in a new issue