-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split MainnetEnvironment into Clio and Reporting mode variants
- Loading branch information
Showing
6 changed files
with
133 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...gration-tests/src/test/java/org/xrpl/xrpl4j/tests/environment/ClioMainnetEnvironment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.xrpl.xrpl4j.tests.environment; | ||
|
||
/*- | ||
* ========================LICENSE_START================================= | ||
* xrpl4j :: integration-tests | ||
* %% | ||
* Copyright (C) 2020 - 2022 XRPL Foundation and its contributors | ||
* %% | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* =========================LICENSE_END================================== | ||
*/ | ||
|
||
import okhttp3.HttpUrl; | ||
import org.xrpl.xrpl4j.client.XrplClient; | ||
import org.xrpl.xrpl4j.model.transactions.Address; | ||
|
||
/** | ||
* XRPL mainnet environment that uses a Clio node. Integration tests can be run against a reporting mode mainnet | ||
* node by using the {@link ReportingMainnetEnvironment}. | ||
*/ | ||
public class ClioMainnetEnvironment extends MainnetEnvironment { | ||
|
||
private final XrplClient xrplClient = new XrplClient(HttpUrl.parse("https://s2-clio.ripple.com:51234")); | ||
|
||
@Override | ||
public XrplClient getXrplClient() { | ||
return xrplClient; | ||
} | ||
|
||
} |
38 changes: 2 additions & 36 deletions
38
...integration-tests/src/test/java/org/xrpl/xrpl4j/tests/environment/MainnetEnvironment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...on-tests/src/test/java/org/xrpl/xrpl4j/tests/environment/ReportingMainnetEnvironment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.xrpl.xrpl4j.tests.environment; | ||
|
||
/*- | ||
* ========================LICENSE_START================================= | ||
* xrpl4j :: integration-tests | ||
* %% | ||
* Copyright (C) 2020 - 2022 XRPL Foundation and its contributors | ||
* %% | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* =========================LICENSE_END================================== | ||
*/ | ||
|
||
import okhttp3.HttpUrl; | ||
import org.xrpl.xrpl4j.client.XrplClient; | ||
import org.xrpl.xrpl4j.model.transactions.Address; | ||
|
||
/** | ||
* XRPL mainnet environment that uses a reporting mode only node. Integration tests can be run against a Clio mainnet | ||
* node by using the {@link ClioMainnetEnvironment}. | ||
*/ | ||
public class ReportingMainnetEnvironment extends MainnetEnvironment { | ||
|
||
private final XrplClient xrplClient = new XrplClient(HttpUrl.parse("https://s2-reporting.ripple.com:51234")); | ||
|
||
@Override | ||
public XrplClient getXrplClient() { | ||
return xrplClient; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters