mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-04-07 02:53:38 +00:00
* store built packages in archive tree instead of repository * write tests to support new changes * implement atomic_move method, move files only with lock * use generic packages tree for all repos * lookup through archive packages before build * add archive trigger * add archive trigger * regenerate docs * gpg loader fix * support requires repostory flag * drop excess REQUIRES_REPOSITORY * simplify symlionk creation * remove generators * fix sttyle * add separate function for symlinks creation * fix rebase * add note about slicing * smol refactoring of archive_tree class * remove duplicate code * fix typos * few review fixes * monor fixes and typos * clean empty directories * remove side effect from getter * drop recursive remove * ensure_exists now accepts only argument * add package like guard to symlinks fix * speedup archive_lookup processing by iterrupting cycle * remove custom filelock * fix naming * remove remove flag from repo * review fixes * restore wrapper around filelock * extract repository explorer to separate class * docs update * fix ide findings
35 lines
990 B
Python
35 lines
990 B
Python
import pytest
|
|
|
|
from ahriman.core.configuration import Configuration
|
|
from ahriman.core.housekeeping import ArchiveRotationTrigger, LogsRotationTrigger
|
|
|
|
|
|
@pytest.fixture
|
|
def archive_rotation_trigger(configuration: Configuration) -> ArchiveRotationTrigger:
|
|
"""
|
|
archive rotation trigger fixture
|
|
|
|
Args:
|
|
configuration(Configuration): configuration fixture
|
|
|
|
Returns:
|
|
ArchiveRotationTrigger: archive rotation trigger test instance
|
|
"""
|
|
_, repository_id = configuration.check_loaded()
|
|
return ArchiveRotationTrigger(repository_id, configuration)
|
|
|
|
|
|
@pytest.fixture
|
|
def logs_rotation_trigger(configuration: Configuration) -> LogsRotationTrigger:
|
|
"""
|
|
logs rotation trigger fixture
|
|
|
|
Args:
|
|
configuration(Configuration): configuration fixture
|
|
|
|
Returns:
|
|
LogsRotationTrigger: logs rotation trigger test instance
|
|
"""
|
|
_, repository_id = configuration.check_loaded()
|
|
return LogsRotationTrigger(repository_id, configuration)
|