mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-31 22:59:55 +00:00
bug: fix removal of the packages
It has been broken since reporter improvements, because it effectivelly 1) didn't call remove functions in database 2) used empty repository identifier for web service With those changes it also raises exception when you try to call id on empty identifier
This commit is contained in:
@ -14,6 +14,7 @@ from ahriman.core.configuration import Configuration
|
||||
from ahriman.core.exceptions import DuplicateRunError, UnsafeRunError
|
||||
from ahriman.models.build_status import BuildStatus, BuildStatusEnum
|
||||
from ahriman.models.internal_status import InternalStatus
|
||||
from ahriman.models.repository_id import RepositoryId
|
||||
|
||||
|
||||
def test_path(args: argparse.Namespace, configuration: Configuration) -> None:
|
||||
@ -30,6 +31,8 @@ def test_path(args: argparse.Namespace, configuration: Configuration) -> None:
|
||||
args.lock = Path("ahriman.pid")
|
||||
assert Lock(args, repository_id, configuration).path == Path("/run/ahriman/ahriman_x86_64-aur-clone.pid")
|
||||
|
||||
assert Lock(args, RepositoryId("", ""), configuration).path == Path("/run/ahriman/ahriman.pid")
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
args.lock = Path("/")
|
||||
assert Lock(args, repository_id, configuration).path # special case
|
||||
|
Reference in New Issue
Block a user