-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add tests for ABCI error codes (#1754)
## Summary Added tests for the ABCI error codes. ## Background The new snapshot test should serve to emphasize that the error codes are part of the API and changes here would be breaking. The other test should help avoid accidental duplication of a value. ## Changes - Added a snapshot test. - Added a test for unique values of error codes. ## Testing These _are_ tests. ## Changelogs No updates required - this is only adding unit tests. ## Related Issues Closes #1634. Co-authored-by: noot <[email protected]>
- Loading branch information
Showing
18 changed files
with
131 additions
and
2 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
5 changes: 5 additions & 0 deletions
5
...ria-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::1.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
1: provided path is unknown |
5 changes: 5 additions & 0 deletions
5
...ia-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::10.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
10: the transaction failed to execute in prepare_proposal() |
5 changes: 5 additions & 0 deletions
5
...ia-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::11.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
11: the transaction failed insertion into the mempool |
5 changes: 5 additions & 0 deletions
5
...ia-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::12.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
12: lower nonce was invalidated in mempool |
5 changes: 5 additions & 0 deletions
5
...ia-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::13.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
13: the request payload was malformed |
5 changes: 5 additions & 0 deletions
5
...ia-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::14.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
14: the transaction is already present in the mempool |
5 changes: 5 additions & 0 deletions
5
...ia-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::15.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
15: there is already a transaction with the same nonce for the account in the mempool |
5 changes: 5 additions & 0 deletions
5
...ia-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::16.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
16: the account has reached the maximum number of parked transactions |
5 changes: 5 additions & 0 deletions
5
...ia-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::17.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
17: the mempool is out of space for more parked transactions |
5 changes: 5 additions & 0 deletions
5
...ria-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::2.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
2: one or more path parameters were invalid |
5 changes: 5 additions & 0 deletions
5
...ria-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::3.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
3: an internal server error occurred |
5 changes: 5 additions & 0 deletions
5
...ria-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::4.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
4: the provided nonce was invalid |
5 changes: 5 additions & 0 deletions
5
...ria-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::5.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
5: the provided transaction was too large |
5 changes: 5 additions & 0 deletions
5
...ria-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::6.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
6: insufficient funds |
5 changes: 5 additions & 0 deletions
5
...ria-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::7.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
7: the provided chain id was invalid |
5 changes: 5 additions & 0 deletions
5
...ria-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::8.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
8: the requested value was not found |
5 changes: 5 additions & 0 deletions
5
...ria-core/src/protocol/snapshots/astria_core__protocol__abci__tests__AbciErrorCode::9.snap
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,5 @@ | ||
--- | ||
source: crates/astria-core/src/protocol/abci.rs | ||
expression: error_code | ||
--- | ||
9: the transaction expired in the app's mempool |