Skip to content

Commit

Permalink
tests: fix existing tests which broke due to removing the branch_name…
Browse files Browse the repository at this point in the history
… default
  • Loading branch information
philipclaesson committed Nov 17, 2023
1 parent feb6c7d commit b226046
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b226046

Please sign in to comment.