From: Serge Hallyn Date: Thu, 22 May 2025 11:27:11 +0000 (-0500) Subject: Revert "tests/: implement feature detection" X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3995ccdb51798667c1b1b9ecb1381d62d04d222;p=thirdparty%2Fshadow.git Revert "tests/: implement feature detection" This reverts commit 8e02cff47522d046030df8c9d50be9129b50a2bd. --- diff --git a/tests/system/framework/hosts/shadow.py b/tests/system/framework/hosts/shadow.py index 2a0ca3e5d..1fb656b63 100644 --- a/tests/system/framework/hosts/shadow.py +++ b/tests/system/framework/hosts/shadow.py @@ -42,9 +42,6 @@ class ShadowHost(BaseHost, BaseLinuxHost): ] """Files to verify for mismatch.""" - self._features: dict[str, bool] | None = None - """Features supported by the host.""" - def pytest_setup(self) -> None: super().pytest_setup() @@ -64,34 +61,6 @@ class ShadowHost(BaseHost, BaseLinuxHost): """ raise NotImplementedError("Stopping shadow service is not implemented.") - @property - def features(self) -> dict[str, bool]: - """ - Features supported by the host. - """ - if self._features is not None: - return self._features - - self.logger.info(f"Detecting shadow features on {self.hostname}") - result = self.conn.run( - """ - set -ex - - getent gshadow > /dev/null 2>&1 && echo "gshadow" || : - """, - log_level=ProcessLogLevel.Error, - ) - - # Set default values - self._features = { - "gshadow": False, - } - - self._features.update({k: True for k in result.stdout_lines}) - self.logger.info("Detected features:", extra={"data": {"Features": self._features}}) - - return self._features - def backup(self) -> Any: """ Backup all shadow data.