From 692869b05b8891d8437c2b8283de7b0a968767e1 Mon Sep 17 00:00:00 2001 From: JimmyFate Date: Sat, 23 Mar 2024 03:34:50 +0100 Subject: [PATCH] Remove test_account_deploy --- bin/sozo/tests/test_account.rs | 44 +++------------------------------- 1 file changed, 3 insertions(+), 41 deletions(-) diff --git a/bin/sozo/tests/test_account.rs b/bin/sozo/tests/test_account.rs index e502e89036..0d42870286 100644 --- a/bin/sozo/tests/test_account.rs +++ b/bin/sozo/tests/test_account.rs @@ -1,18 +1,12 @@ mod utils; -use std::{env, fs}; +use std::fs; use assert_fs::fixture::PathChild; -use starknet_crypto::FieldElement; +use sozo_ops::account; +use starknet::accounts::Account; use utils::snapbox::get_snapbox; -use sozo_ops::account::{self, FeeSetting}; - -use starknet::{ - accounts::Account, - signers::{LocalWallet, SigningKey}, -}; - #[test] fn test_account_new() { let pt = assert_fs::TempDir::new().unwrap(); @@ -35,38 +29,6 @@ fn test_account_new() { assert!(pt.child("account.json").exists()); } -#[katana_runner::katana_test(1, true)] -async fn test_account_deploy() { - let account_path = fs::canonicalize("./tests/test_data/account/account.json").unwrap(); - let keystore_path = fs::canonicalize("./tests/test_data/keystore/keystore.json").unwrap(); - - let pt = assert_fs::TempDir::new().unwrap(); - fs::copy(account_path.clone(), pt.child("account.json")).unwrap(); - - let signer = LocalWallet::from_signing_key( - SigningKey::from_keystore(keystore_path, "password").unwrap(), - ); - - let contents = fs::read_to_string(pt.child("account.json")).unwrap(); - assert!(contents.contains(r#""status": "undeployed""#)); - - env::set_var("PASS_STDIN", "1"); - account::deploy( - runner.owned_provider(), - signer, - FeeSetting::Manual(FieldElement::from(1000_u32)), - false, - None, - 1000, - account_path, - ) - .await - .unwrap(); - - let contents = fs::read_to_string(pt.child("account.json")).unwrap(); - assert!(contents.contains(r#""status": "deployed""#)); -} - #[katana_runner::katana_test(1, true)] async fn test_account_fetch() { let pt = assert_fs::TempDir::new().unwrap();