fix: suggestions fix

This commit is contained in:
Oleksandr Pravdyvyi 2025-10-28 10:41:40 +02:00
parent 13232200c0
commit bf25c92b30
No known key found for this signature in database
GPG Key ID: 9F8955C63C443871
5 changed files with 25 additions and 25 deletions

View File

@ -11,7 +11,7 @@ members = [
"sequencer_core",
"common",
"nssa",
"proc_macro_test_attribute",
"integration_tests/proc_macro_test_attribute",
]
[workspace.dependencies]

View File

@ -17,7 +17,7 @@ borsh.workspace = true
nssa-core = { path = "../nssa/core", features = ["host"] }
proc_macro_test_attribute = { path = "../proc_macro_test_attribute" }
proc_macro_test_attribute = { path = "./proc_macro_test_attribute" }
[dependencies.clap]
features = ["derive", "env"]

View File

@ -3,7 +3,7 @@ extern crate proc_macro;
use proc_macro::*;
#[proc_macro_attribute]
pub fn test_suite_fn(_attr: TokenStream, item: TokenStream) -> TokenStream {
pub fn nssa_integration_test(_attr: TokenStream, item: TokenStream) -> TokenStream {
let input = item.to_string();
let fn_keyword = "fn ";

View File

@ -37,7 +37,7 @@ type TestFunction = fn(PathBuf) -> Pin<Box<dyn Future<Output = ()>>>;
pub fn prepare_function_map() -> HashMap<String, TestFunction> {
let mut function_map: HashMap<String, TestFunction> = HashMap::new();
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success() {
info!("test_success");
let command = Command::Transfer(NativeTokenTransferProgramSubcommand::Public {
@ -74,7 +74,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_move_to_another_account() {
info!("test_success_move_to_another_account");
let command = Command::Account(AccountSubcommand::Register(RegisterSubcommand::Public {}));
@ -131,7 +131,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_failure() {
info!("test_failure");
let command = Command::Transfer(NativeTokenTransferProgramSubcommand::Public {
@ -170,7 +170,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_two_transactions() {
info!("test_success_two_transactions");
let command = Command::Transfer(NativeTokenTransferProgramSubcommand::Public {
@ -236,7 +236,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Second TX Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_get_account() {
info!("test_get_account");
let wallet_config = fetch_config().await.unwrap();
@ -259,7 +259,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
/// This test creates a new token using the token program. After creating the token, the test executes a
/// token transfer to a new account.
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_token_program() {
let wallet_config = fetch_config().await.unwrap();
@ -409,7 +409,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
/// This test creates a new private token using the token program. After creating the token, the test executes a
/// private token transfer to a new account. All accounts are owned except definition.
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_token_program_private_owned() {
let wallet_config = fetch_config().await.unwrap();
@ -557,7 +557,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
/// This test creates a new private token using the token program. After creating the token, the test executes a
/// private token transfer to a new account.
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_token_program_private_claiming_path() {
let wallet_config = fetch_config().await.unwrap();
@ -693,7 +693,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
/// This test creates a new public token using the token program. After creating the token, the test executes a
/// shielded token transfer to a new account. All accounts are owned except definition.
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_token_program_shielded_owned() {
let wallet_config = fetch_config().await.unwrap();
@ -820,7 +820,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
/// This test creates a new private token using the token program. After creating the token, the test executes a
/// deshielded token transfer to a new account. All accounts are owned except definition.
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_token_program_deshielded_owned() {
let wallet_config = fetch_config().await.unwrap();
@ -956,7 +956,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
assert!(verify_commitment_is_in_state(new_commitment1, &seq_client).await);
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_private_transfer_to_another_owned_account() {
info!("test_success_private_transfer_to_another_owned_account");
let from: Address = ACC_SENDER_PRIVATE.parse().unwrap();
@ -992,7 +992,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_private_transfer_to_another_foreign_account() {
info!("test_success_private_transfer_to_another_foreign_account");
let from: Address = ACC_SENDER_PRIVATE.parse().unwrap();
@ -1039,7 +1039,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_private_transfer_to_another_owned_account_claiming_path() {
info!("test_success_private_transfer_to_another_owned_account_claiming_path");
let from: Address = ACC_SENDER_PRIVATE.parse().unwrap();
@ -1108,7 +1108,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_private_transfer_to_another_owned_account_cont_run_path() {
info!("test_success_private_transfer_to_another_owned_account_cont_run_path");
let continious_run_handle = tokio::spawn(wallet::execute_continious_run());
@ -1179,7 +1179,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_deshielded_transfer_to_another_account() {
info!("test_success_deshielded_transfer_to_another_account");
let from: Address = ACC_SENDER_PRIVATE.parse().unwrap();
@ -1225,7 +1225,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_shielded_transfer_to_another_owned_account() {
info!("test_success_shielded_transfer_to_another_owned_account");
let from: Address = ACC_SENDER.parse().unwrap();
@ -1266,7 +1266,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_success_shielded_transfer_to_another_foreign_account() {
info!("test_success_shielded_transfer_to_another_foreign_account");
let to_npk = NullifierPublicKey([42; 32]);
@ -1312,7 +1312,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_pinata() {
info!("test_pinata");
let pinata_addr = "cafe".repeat(16);
@ -1360,7 +1360,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_program_deployment() {
info!("test program deployment");
let bytecode = NSSA_PROGRAM_FOR_TEST_DATA_CHANGER.to_vec();
@ -1407,7 +1407,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_authenticated_transfer_initialize_function() {
info!("test initialize account for authenticated transfer");
let command = Command::AuthenticatedTransferInitializePublicAccount {};
@ -1439,7 +1439,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_pinata_private_receiver() {
info!("test_pinata_private_receiver");
let pinata_addr = "cafe".repeat(16);
@ -1503,7 +1503,7 @@ pub fn prepare_function_map() -> HashMap<String, TestFunction> {
info!("Success!");
}
#[test_suite_fn]
#[nssa_integration_test]
pub async fn test_pinata_private_receiver_new_account() {
info!("test_pinata_private_receiver");
let pinata_addr = "cafe".repeat(16);