in src/modules/filesystem_freeze.py [0:0]
def run(self) -> Dict[str, Any]:
"""
Run the test case when the filesystem is frozen.
:return: A dictionary containing the result of the test case.
:rtype: Dict[str, Any]
"""
file_system, mount_point = self._find_filesystem()
if file_system and mount_point:
self.log(
logging.INFO,
f"Found the filesystem mounted on: {file_system} at {mount_point}",
)
read_only_output = self.execute_command_subprocess(
FREEZE_FILESYSTEM(file_system, mount_point)
)
self.log(logging.INFO, read_only_output)
self.result.update(
{
"changed": True,
"message": f"The file system ({mount_point}) was mounted read-only.",
"status": TestStatus.SUCCESS.value,
"details": read_only_output,
"mount_point": mount_point,
}
)
else:
self.result.update(
{
"message": "The filesystem mounted on /hana/shared was not found.",
"status": TestStatus.ERROR.value,
}
)
return self.result