This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wait for private Tx receipt in acceptance tests.
- Loading branch information
1 parent
2979d66
commit cbb9ca5
Showing
7 changed files
with
116 additions
and
7 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
36 changes: 36 additions & 0 deletions
36
...pantheon/tests/acceptance/dsl/condition/eea/ExpectSuccessfulEeaGetTransactionReceipt.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,36 @@ | ||
/* | ||
* Copyright 2018 ConsenSys AG. | ||
* | ||
* 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. | ||
*/ | ||
package tech.pegasys.pantheon.tests.acceptance.dsl.condition.eea; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.Condition; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.node.Node; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.ResponseTypes; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.eea.EeaGetTransactionReceiptTransaction; | ||
|
||
public class ExpectSuccessfulEeaGetTransactionReceipt implements Condition { | ||
|
||
private final EeaGetTransactionReceiptTransaction transaction; | ||
|
||
public ExpectSuccessfulEeaGetTransactionReceipt( | ||
final EeaGetTransactionReceiptTransaction transaction) { | ||
this.transaction = transaction; | ||
} | ||
|
||
@Override | ||
public void verify(final Node node) { | ||
final ResponseTypes.PrivateTransactionReceipt response = node.execute(transaction); | ||
assertThat(response.getContractAddress()).isNotEqualTo("0x"); | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
acceptance-tests/src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/jsonrpc/Eea.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,32 @@ | ||
/* | ||
* Copyright 2019 ConsenSys AG. | ||
* | ||
* 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. | ||
*/ | ||
package tech.pegasys.pantheon.tests.acceptance.dsl.jsonrpc; | ||
|
||
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.Condition; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.eea.ExpectSuccessfulEeaGetTransactionReceipt; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.transaction.eea.EeaTransactions; | ||
|
||
public class Eea { | ||
|
||
EeaTransactions transactions; | ||
|
||
public Eea(final EeaTransactions transactions) { | ||
this.transactions = transactions; | ||
} | ||
|
||
public Condition expectSuccessfulTransactionReceipt( | ||
final String transactionHash, final String publicKey) { | ||
return new ExpectSuccessfulEeaGetTransactionReceipt( | ||
transactions.getTransactionReceipt(transactionHash, publicKey)); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...test/java/tech/pegasys/pantheon/tests/acceptance/dsl/transaction/eea/EeaTransactions.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,21 @@ | ||
/* | ||
* Copyright 2019 ConsenSys AG. | ||
* | ||
* 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. | ||
*/ | ||
package tech.pegasys.pantheon.tests.acceptance.dsl.transaction.eea; | ||
|
||
public class EeaTransactions { | ||
|
||
public EeaGetTransactionReceiptTransaction getTransactionReceipt( | ||
final String transactionHash, final String pubKey) { | ||
return new EeaGetTransactionReceiptTransaction(transactionHash, pubKey); | ||
} | ||
} |
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
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