Skip to content

Commit

Permalink
fix: setup manager fix, clear repositories db
Browse files Browse the repository at this point in the history
  • Loading branch information
renatav committed Jan 10, 2025
1 parent d9dba0a commit 828cc06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 3 additions & 7 deletions taf/tests/test_updater/test_clone/test_clone_valid.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@
indirect=True,
)
def test_clone_valid_happy_path(origin_auth_repo, client_dir, benchmark):
setup_manager = SetupManager(origin_auth_repo)
setup_manager.add_task(add_valid_target_commits)
setup_manager.execute_tasks()

def clone_valid_happy_path_inner(origin_auth_repo, client_dir):
setup_manager = SetupManager(origin_auth_repo)
setup_manager.add_task(add_valid_target_commits)
setup_manager.execute_tasks()

is_test_repo = origin_auth_repo.is_test_repo
expected_repo_type = UpdateType.TEST if is_test_repo else UpdateType.OFFICIAL
update_and_check_commit_shas(
Expand All @@ -50,10 +49,7 @@ def clone_valid_happy_path_inner(origin_auth_repo, client_dir):
client_dir,
expected_repo_type=expected_repo_type,
)
breakpoint()

cleanup_directory(client_dir)
breakpoint()

benchmark(clone_valid_happy_path_inner, origin_auth_repo, client_dir)

Expand Down
1 change: 1 addition & 0 deletions taf/tests/test_updater/update_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def load_target_repositories(
if library_dir is None:
library_dir = auth_repo.path.parent.parent

repositoriesdb.clear_repositories_db()
repositoriesdb.load_repositories(
auth_repo,
library_dir=library_dir,
Expand Down

0 comments on commit 828cc06

Please sign in to comment.