Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yuunlimm committed Oct 15, 2024
1 parent 057d059 commit a9a7351
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion rust/integration-tests/src/cli_parser.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
use std::sync::Mutex;
use once_cell::sync::Lazy;
use std::sync::Mutex;

// Define a global static to store the parsed arguments
#[allow(dead_code)]
static TEST_CONFIG: Lazy<Mutex<TestArgs>> = Lazy::new(|| {
let args = parse_test_args();
Mutex::new(args)
});

// function to fetch global test args
#[allow(dead_code)]
pub fn get_test_config() -> (bool, Option<String>) {
let test_args = TEST_CONFIG.lock().unwrap().clone();
(test_args.generate_output, test_args.output_path)
Expand Down
2 changes: 1 addition & 1 deletion rust/integration-tests/src/diff_tests/all_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
mod test {

use crate::{
cli_parser::get_test_config,
diff_test_helper::{
event_processor::load_data as load_event_data,
fungible_asset_processor::load_data as load_fungible_asset_data,
Expand All @@ -12,7 +13,6 @@ mod test {
get_expected_imported_mainnet_txns, get_expected_imported_testnet_txns,
get_expected_scripted_txns, remove_inserted_at, remove_transaction_timestamp,
},
cli_parser::get_test_config,
DiffTest, TestContext, TestProcessorConfig, TestType,
};
use anyhow::Context;
Expand Down
2 changes: 1 addition & 1 deletion rust/integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ use testcontainers::{
ContainerAsync, GenericImage, ImageExt,
};

mod cli_parser;
mod diff_test_helper;
mod diff_tests;
mod models;
mod scenarios_tests;
mod cli_parser;

/// The test context struct holds the test name and the transaction batches.
pub struct TestContext {
Expand Down

0 comments on commit a9a7351

Please sign in to comment.