mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-03-20 08:33:38 +00:00
add config validator subcommand (#80)
* add config validator subcommand * add --exit-code flag * docs & faq update
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from ahriman.core.formatters import AurPrinter, ConfigurationPrinter, PackagePrinter, PatchPrinter, StatusPrinter, \
|
||||
StringPrinter, TreePrinter, UpdatePrinter, UserPrinter, VersionPrinter
|
||||
StringPrinter, TreePrinter, UpdatePrinter, UserPrinter, ValidationPrinter, VersionPrinter
|
||||
from ahriman.models.aur_package import AURPackage
|
||||
from ahriman.models.build_status import BuildStatus
|
||||
from ahriman.models.package import Package
|
||||
@@ -126,6 +126,29 @@ def user_printer(user: User) -> UserPrinter:
|
||||
return UserPrinter(user)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def validation_printer() -> ValidationPrinter:
|
||||
"""
|
||||
fixture for validation printer
|
||||
|
||||
Returns:
|
||||
ValidationPrinter: validation printer test instance
|
||||
"""
|
||||
return ValidationPrinter("root", [
|
||||
"root error",
|
||||
{
|
||||
"child": [
|
||||
"child error",
|
||||
{
|
||||
"grandchild": [
|
||||
"grandchild error",
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
])
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def version_printer(package_ahriman: Package) -> VersionPrinter:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user