diff --git a/packages/opal-common/opal_common/git/tests/repo_watcher_test.py b/packages/opal-common/opal_common/git/tests/repo_watcher_test.py index d94eff2e..215de4b0 100644 --- a/packages/opal-common/opal_common/git/tests/repo_watcher_test.py +++ b/packages/opal-common/opal_common/git/tests/repo_watcher_test.py @@ -46,6 +46,7 @@ async def failure_callback(e: Exception): # configure the watcher to watch an invalid repo watcher = GitPolicySource( remote_source_url=INVALID_REPO_REMOTE_URL, + branch_name="master", local_clone_path=target_path, request_timeout=3, ) @@ -86,7 +87,9 @@ async def new_commits_callback( # configure the watcher with a valid local repo (our test repo) # the returned repo will track the local remote repo watcher = GitPolicySource( - remote_source_url=remote_repo.working_tree_dir, local_clone_path=target_path + remote_source_url=remote_repo.working_tree_dir, + local_clone_path=target_path, + branch_name=remote_repo.active_branch.name, ) # configure the error callback watcher.add_on_new_policy_callback(partial(new_commits_callback, detected_commits)) @@ -157,6 +160,7 @@ async def new_commits_callback( watcher = GitPolicySource( remote_source_url=remote_repo.working_tree_dir, local_clone_path=target_path, + branch_name=remote_repo.active_branch.name, polling_interval=3, # every 3 seconds do a pull to try and detect changes ) # configure the error callback