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
This commit is contained in:
2023-10-16 14:32:00 +03:00
parent 5a4b6c69a5
commit c5bd862ae9
9 changed files with 32 additions and 16 deletions

View File

@ -245,19 +245,17 @@ def auth(configuration: Configuration) -> Auth:
@pytest.fixture
def configuration(repository_id: RepositoryId, resource_path_root: Path, mocker: MockerFixture) -> Configuration:
def configuration(repository_id: RepositoryId, resource_path_root: Path) -> Configuration:
"""
configuration fixture
Args:
repository_id(RepositoryId): repository identifier fixture
resource_path_root(Path): resource path root directory
mocker(MockerFixture): mocker object
Returns:
Configuration: configuration test instance
"""
mocker.patch("ahriman.core.configuration.Configuration.load_includes")
path = resource_path_root / "core" / "ahriman.ini"
return Configuration.from_path(path, repository_id)

View File

@ -45,10 +45,7 @@ def test_from_path(repository_id: RepositoryId, mocker: MockerFixture) -> None:
configuration = Configuration.from_path(path, repository_id)
assert configuration.path == path
read_mock.assert_called_once_with(path)
load_includes_mock.assert_has_calls([
MockCall(),
MockCall(configuration.repository_paths.root),
])
load_includes_mock.assert_called_once_with()
def test_from_path_file_missing(repository_id: RepositoryId, mocker: MockerFixture) -> None: