Skip to content

Commit

Permalink
Merge pull request #96 from HebaruSan/fix/repo-priority
Browse files Browse the repository at this point in the history
Make local repository higher priority than default
  • Loading branch information
HebaruSan authored Sep 20, 2023
2 parents bd76ffc + 18fb8d8 commit 4498fe4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ckan_meta_tester/dummy_game_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def __enter__(self) -> 'DummyGameInstance':
logging.debug('Adding repo %s', self.addl_repo.as_uri())
run(['mono', self.ckan_exe, 'repo', 'add', 'local', self.addl_repo.as_uri()],
capture_output=self.capture)
run(['mono', self.ckan_exe, 'repo', 'priority', 'local', '0'],
capture_output=self.capture)
if self.SAVED_REGISTRY.exists():
logging.debug('Restoring saved registry from %s', self.SAVED_REGISTRY)
copy(self.SAVED_REGISTRY, self.registry_path)
Expand Down
3 changes: 3 additions & 0 deletions tests/dummy_game_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def test_dummy_game_instance_calls(self,
call(['mono', PosixPath('/ckan.exe'), 'repo', 'add',
'local', 'file:///repo/metadata.tar.gz'],
capture_output=True),
call(['mono', PosixPath('/ckan.exe'), 'repo', 'priority',
'local', '0'],
capture_output=True),
call(['mono', PosixPath('/ckan.exe'), 'update'],
capture_output=True),
call(['mono', PosixPath('/ckan.exe'), 'instance', 'forget', 'dummy'],
Expand Down

0 comments on commit 4498fe4

Please sign in to comment.