Skip to content

Commit

Permalink
fixes recursive symlink error when invoking ./run_tests script
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewcasale committed Mar 28, 2024
1 parent 180ac84 commit 7697a33
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 225 deletions.
160 changes: 0 additions & 160 deletions fastlane_bot/tests/deterministic/_data/test_results.json

This file was deleted.

56 changes: 0 additions & 56 deletions fastlane_bot/tests/deterministic/_data/test_strategies.json

This file was deleted.

2 changes: 1 addition & 1 deletion fastlane_bot/tests/deterministic/dtest_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
DEFAULT_FROM_BLOCK = 1000000
TENDERLY_RPC_KEY = "fb866397-29bd-4886-8406-a2cc7b7c5b1f" # https://virtual.mainnet.rpc.tenderly.co/9ea4ceb3-d0f5-4faf-959e-f51cf1f6b52b, from_block: 19325893, fb866397-29bd-4886-8406-a2cc7b7c5b1f
REAL_DATA_DIR = "fastlane_bot/data/blockchain_data"
TEST_DATA_DIR = "fastlane_bot/tests/deterministic/_data"
TEST_DATA_DIR = "fastlane_bot/tests/_data"
binance14 = "0x28C6c06298d514Db089934071355E5743bf21d60"
TOKENS_MODIFICATIONS = {
"0x0": {
Expand Down
13 changes: 6 additions & 7 deletions fastlane_bot/tests/deterministic/dtest_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ def get_logger(args: argparse.Namespace) -> logging.Logger:
return logger


def set_test_state_task(args: argparse.Namespace):
def set_test_state_task(mgr: TestManager):
"""
Sets the test state based on the static_pool_data_testing.csv file.
Args:
args: argparse.Namespace, the command line arguments
mgr: TestManager, the test manager
"""
args.logger.info("\nRunning set_test_state_task...")

test_pools = TestPool.load_test_pools()

Expand All @@ -55,8 +54,8 @@ def set_test_state_task(args: argparse.Namespace):
for index, test_pools_row in test_pools.iterrows()
]
pools = [pool for pool in pools if pool.is_supported]
builder = TestPoolParamsBuilder(args.w3)
builder.update_pools_by_exchange(args, builder, pools, args.w3)
builder = TestPoolParamsBuilder(mgr.w3)
builder.update_pools_by_exchange(mgr.args, builder, pools, mgr.w3)


def get_carbon_strategies_and_delete_task(
Expand Down Expand Up @@ -192,14 +191,14 @@ def main(args: argparse.Namespace):
test_manager.delete_old_logs(args)

if args.task == "set_test_state":
set_test_state_task(test_manager.w3)
set_test_state_task(test_manager)
elif args.task == "get_carbon_strategies_and_delete":
get_carbon_strategies_and_delete_task(test_manager, args)
elif args.task == "run_tests_on_mode":
_extracted_run_tests_on_mode(test_manager, args)
elif args.task == "end_to_end":
get_carbon_strategies_and_delete_task(test_manager, args)
set_test_state_task(test_manager.w3)
set_test_state_task(test_manager)
_extracted_run_tests_on_mode(test_manager, args)
else:
raise ValueError(f"Task {args.task} not recognized")
Expand Down
1 change: 1 addition & 0 deletions fastlane_bot/tests/deterministic/dtest_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def __init__(self, args: argparse.Namespace):
)

self.carbon_controller = carbon_controller
self.args = args

@property
def logs_path(self) -> str:
Expand Down
1 change: 0 additions & 1 deletion fastlane_bot/tests/deterministic/unit/fastlane_bot

This file was deleted.

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions log.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Searching for main.py in /Users/mikewcasale/Documents/GitHub/bancor/fastlane-bot
5 changes: 5 additions & 0 deletions resources/NBTest/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Inside this file, define a collect_ignore list that specifies the file paths to ignore when running the tests. For
example, to ignore all files in the tests directory that start with the prefix "dtest_", you can use the following
code:"""
collect_ignore = ['dtest_*.py',
]

0 comments on commit 7697a33

Please sign in to comment.