Add a way to skip tests if they don't match the target

This commit is contained in:
Omar Abdulla
2025-07-22 09:07:01 +03:00
parent a0248b58f3
commit 5c957e5ac1
8 changed files with 63 additions and 30 deletions
+9 -1
View File
@@ -26,7 +26,15 @@ impl Case {
.enumerate()
.map(move |(idx, mut input)| {
if idx + 1 == inputs_len {
input.expected = self.expected.clone();
if input.expected.is_none() {
input.expected = self.expected.clone();
}
// TODO: What does it mean for us to have an `expected` field on the case itself
// but the final input also has an expected field that doesn't match the one on
// the case? What are we supposed to do with that final expected field on the
// case?
input
} else {
input
+1 -1
View File
@@ -324,7 +324,7 @@ impl Input {
chain_state_provider: &impl EthereumNode,
) -> anyhow::Result<TransactionRequest> {
let input_data = self.encoded_input(deployed_contracts, chain_state_provider)?;
let transaction_request = TransactionRequest::default();
let transaction_request = TransactionRequest::default().from(self.caller);
match self.method {
Method::Deployer => Ok(transaction_request.with_deploy_code(input_data)),
_ => Ok(transaction_request
+1
View File
@@ -48,6 +48,7 @@ impl Deref for MetadataFile {
#[derive(Debug, Default, Deserialize, Clone, Eq, PartialEq)]
pub struct Metadata {
pub targets: Option<Vec<String>>,
pub cases: Vec<Case>,
pub contracts: Option<BTreeMap<ContractInstance, ContractPathAndIdentifier>>,
// TODO: Convert into wrapper types for clarity.