From 7d9dfcb53c8e53183b1b2386a03b41fd02d8608d Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 17 Aug 2021 15:42:08 +0300 Subject: [PATCH] fix: skip 2930 tests in legacy mode / skip aws test if no id (#386) * fix: skip 2930 tests in legacy mode * test: skip aws signer test if no key id is set --- ethers-core/src/types/transaction/eip2930.rs | 1 + ethers-signers/src/aws/mod.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ethers-core/src/types/transaction/eip2930.rs b/ethers-core/src/types/transaction/eip2930.rs index cb1cdcdf..6181ef97 100644 --- a/ethers-core/src/types/transaction/eip2930.rs +++ b/ethers-core/src/types/transaction/eip2930.rs @@ -127,6 +127,7 @@ mod tests { } #[test] + #[cfg_attr(feature = "legacy", ignore)] fn serde_eip2930_tx() { let access_list = vec![AccessListItem { address: Address::zero(), diff --git a/ethers-signers/src/aws/mod.rs b/ethers-signers/src/aws/mod.rs index 8cc668d7..f57f0b11 100644 --- a/ethers-signers/src/aws/mod.rs +++ b/ethers-signers/src/aws/mod.rs @@ -301,7 +301,10 @@ mod tests { #[tokio::test] async fn it_signs_messages() { let chain_id = 1; - let key_id = std::env::var("AWS_KEY_ID").expect("no key id"); + let key_id = match std::env::var("AWS_KEY_ID") { + Ok(id) => id, + _ => return, + }; setup_tracing(); let client = env_client(); let signer = AwsSigner::new(&client, key_id, chain_id).await.unwrap();