46 lines
1.1 KiB
Python
46 lines
1.1 KiB
Python
"""
|
|
Environment probes for verifying system state in workshop-baker tests.
|
|
|
|
Each probe is a standalone function that can be called from any test.
|
|
Probes return bool or Optional[int/str]; they do not raise on failure.
|
|
|
|
A probe accepts an optional *runner* callable (default ``subprocess.run``)
|
|
that decouples it from the execution context (host or Docker).
|
|
"""
|
|
|
|
from .user import user_exists, user_uid, user_gid, user_in_group, user_shell
|
|
from .file import (
|
|
file_exists,
|
|
file_absent,
|
|
dir_exists,
|
|
dir_absent,
|
|
file_permissions,
|
|
file_contains,
|
|
file_owned_by,
|
|
file_group,
|
|
)
|
|
from .package import binary_exists, binary_on_path, package_installed, package_version
|
|
from .process import process_running, process_count
|
|
|
|
__all__ = [
|
|
"user_exists",
|
|
"user_uid",
|
|
"user_gid",
|
|
"user_in_group",
|
|
"user_shell",
|
|
"file_exists",
|
|
"file_absent",
|
|
"dir_exists",
|
|
"dir_absent",
|
|
"file_permissions",
|
|
"file_contains",
|
|
"file_owned_by",
|
|
"file_group",
|
|
"package_installed",
|
|
"package_version",
|
|
"binary_exists",
|
|
"binary_on_path",
|
|
"process_running",
|
|
"process_count",
|
|
]
|