mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-11-04 15:53:41 +00:00
feat: allow to use single web instance for all repositories (#114)
* Allow to use single web instance for any repository * some improvements * drop includes from user home directory, introduce new variables to docker The old solution didn't actually work as expected, because devtools configuration belongs to filesystem (as well as sudo one), so it was still required to run setup command. In order to handle additional repositories, the POSTSETUP and PRESETUP commands variables have been introduced. FAQ has been updated as well * raise 404 in case if repository is unknown
This commit is contained in:
@ -21,6 +21,29 @@ def test_id() -> None:
|
||||
assert RepositoryId("arch", "repo").id == "arch-repo"
|
||||
|
||||
|
||||
def test_query() -> None:
|
||||
"""
|
||||
must generate query request parameters
|
||||
"""
|
||||
assert RepositoryId("x86_64", "a").query() == [("architecture", "x86_64"), ("repository", "a")]
|
||||
assert RepositoryId("i686", "a").query() == [("architecture", "i686"), ("repository", "a")]
|
||||
assert RepositoryId("x86_64", "b").query() == [("architecture", "x86_64"), ("repository", "b")]
|
||||
|
||||
|
||||
def test_view() -> None:
|
||||
"""
|
||||
must generate json view
|
||||
"""
|
||||
repository_id = RepositoryId("x86_64", "a")
|
||||
assert repository_id.view() == {"architecture": repository_id.architecture, "repository": repository_id.name}
|
||||
|
||||
repository_id = RepositoryId("x86_64", "b")
|
||||
assert repository_id.view() == {"architecture": repository_id.architecture, "repository": repository_id.name}
|
||||
|
||||
repository_id = RepositoryId("i686", "a")
|
||||
assert repository_id.view() == {"architecture": repository_id.architecture, "repository": repository_id.name}
|
||||
|
||||
|
||||
def test_lt() -> None:
|
||||
"""
|
||||
must correctly compare instances
|
||||
|
||||
Reference in New Issue
Block a user