Skip to content

Commit

Permalink
chore: rename all modules named test to tests (#1578)
Browse files Browse the repository at this point in the history
## Summary
A trivial rename of some modules.

## Background
It's canonical to name unit test modules as `tests`. We currently have a
mixture of `test` and `tests` throughout the codebase.

## Changes
- Renamed all `test` modules to `tests`.  No actual tests were changed.
  • Loading branch information
Fraser999 authored Sep 27, 2024
1 parent 33dae42 commit 70046bd
Show file tree
Hide file tree
Showing 26 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion crates/astria-cli/src/commands/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ async fn submit_transaction(
}

#[cfg(test)]
mod test {
mod tests {
use super::*;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-conductor/src/celestia/block_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ fn verify_vote_signature(
}

#[cfg(test)]
mod test {
mod tests {
use std::collections::BTreeMap;

use astria_core::{
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-conductor/src/conductor/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ fn check_for_restart(name: &str, err: &eyre::ErrReport) -> bool {
}

#[cfg(test)]
mod test {
mod tests {
use astria_eyre::eyre::WrapErr as _;

#[test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/astria-core/src/protocol/memos/v1alpha1.rs
assertion_line: 28
expression: memo
---
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/astria-core/src/protocol/memos/v1alpha1.rs
assertion_line: 19
expression: memo
---
{
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-core/src/protocol/memos/v1alpha1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub use crate::generated::protocol::memos::v1alpha1::{
};

#[cfg(all(feature = "serde", test))]
mod test {
mod tests {
use super::*;

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ enum TransactionFeeResponseErrorKind {
}

#[cfg(test)]
mod test {
mod tests {
use super::*;
use crate::{
primitive::v1::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/astria-core/src/protocol/transaction/v1alpha1/mod.rs
assertion_line: 613
expression: tx.id()
---
{
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-eyre/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ mod anyhow_conversion {
}

#[cfg(test)]
mod test {
mod tests {
#[test]
fn anyhow_to_eyre_preserves_source_chain() {
let mut errs = ["foo", "bar", "baz", "qux"];
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/address/state_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pub(crate) trait StateWriteExt: StateWrite {
impl<T: StateWrite> StateWriteExt for T {}

#[cfg(test)]
mod test {
mod tests {
use cnidarium::StateDelta;

use super::{
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/api_state_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ pub(crate) trait StateWriteExt: StateWrite {
impl<T: StateWrite> StateWriteExt for T {}

#[cfg(test)]
mod test {
mod tests {
use astria_core::{
primitive::v1::TransactionId,
protocol::test_utils::ConfigureSequencerBlock,
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/authority/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl ActionHandler for IbcSudoChangeAction {
}

#[cfg(test)]
mod test {
mod tests {
use astria_core::primitive::v1::TransactionId;
use cnidarium::StateDelta;

Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/bridge/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ fn preprocess_request(params: &[(String, String)]) -> Result<Address, response::
}

#[cfg(test)]
mod test {
mod tests {
use astria_core::{
generated::protocol::bridge::v1alpha1::BridgeAccountInfoResponse as RawBridgeAccountInfoResponse,
primitive::v1::RollupId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/astria-sequencer/src/bridge/state_ext.rs
assertion_line: 812
expression: asset_id_storage_key(&address)
---
bridgeacc/1c0c490f1b5528d8173c5de46d131160e4b2c0c3/assetid
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/astria-sequencer/src/bridge/state_ext.rs
assertion_line: 813
expression: bridge_account_sudo_address_storage_key(&address)
---
bsudo/1c0c490f1b5528d8173c5de46d131160e4b2c0c3
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/astria-sequencer/src/bridge/state_ext.rs
assertion_line: 814
expression: bridge_account_withdrawer_address_storage_key(&address)
---
bwithdrawer/1c0c490f1b5528d8173c5de46d131160e4b2c0c3
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
source: crates/astria-sequencer/src/bridge/state_ext.rs
assertion_line: 811
expression: rollup_id_storage_key(&address)
---
bridgeacc/1c0c490f1b5528d8173c5de46d131160e4b2c0c3/rollupid
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/bridge/state_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ pub(crate) trait StateWriteExt: StateWrite {
impl<T: StateWrite> StateWriteExt for T {}

#[cfg(test)]
mod test {
mod tests {
use astria_core::{
primitive::v1::{
asset,
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/grpc/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ impl SequencerService for SequencerServer {
}

#[cfg(test)]
mod test {
mod tests {
use astria_core::{
protocol::test_utils::ConfigureSequencerBlock,
sequencerblock::v1alpha1::SequencerBlock,
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/mempool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ impl Mempool {
}

#[cfg(test)]
mod test {
mod tests {
use astria_core::crypto::SigningKey;

use super::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ impl<const MAX_TX_COUNT: usize> TransactionsContainer<ParkedTransactionsForAccou
}

#[cfg(test)]
mod test {
mod tests {
use astria_core::crypto::SigningKey;

use super::*;
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/proposal/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub(crate) fn generate_rollup_datas_commitment(
}

#[cfg(test)]
mod test {
mod tests {
use astria_core::{
crypto::SigningKey,
protocol::transaction::v1alpha1::{
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/sequence/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ fn calculate_fee(data: &[u8], fee_per_byte: u128, base_fee: u128) -> Option<u128
}

#[cfg(test)]
mod test {
mod tests {
use super::*;

#[test]
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/sequence/state_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ pub(crate) trait StateWriteExt: StateWrite {
impl<T: StateWrite> StateWriteExt for T {}

#[cfg(test)]
mod test {
mod tests {
use cnidarium::StateDelta;

use super::{
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/service/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl Consensus {
}

#[cfg(test)]
mod test {
mod tests {
use std::{
collections::HashMap,
str::FromStr,
Expand Down
2 changes: 1 addition & 1 deletion crates/astria-sequencer/src/service/info/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl Service<InfoRequest> for Info {
}

#[cfg(test)]
mod test {
mod tests {
use astria_core::{
primitive::v1::asset,
protocol::{
Expand Down

0 comments on commit 70046bd

Please sign in to comment.