File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,6 +258,8 @@ def run_check(self, stop_time):
258258
259259 :param int stop_time: the time the test completed
260260 """
261+ stratisd_tools = "stratisd-tools"
262+
261263 if PoolMetadataMonitor .verify : # pylint: disable=no-member
262264
263265 # Wait for D-Bus to settle, so D-Bus and metadata can be compared
@@ -281,6 +283,25 @@ def run_check(self, stop_time):
281283 )
282284
283285 self ._check_encryption_information_consistency (object_path , written )
286+
287+ with NamedTemporaryFile (mode = "w" ) as temp_file :
288+ temp_file .write (json .dumps (written ))
289+ temp_file .flush ()
290+
291+ try :
292+ with subprocess .Popen (
293+ [
294+ stratisd_tools ,
295+ "stratis-checkmetadata" ,
296+ temp_file .name ,
297+ ],
298+ stdout = subprocess .PIPE ,
299+ ) as proc :
300+ (stdoutdata , _ ) = proc .communicate ()
301+ self .assertEqual (proc .returncode , 0 , stdoutdata )
302+ except FileNotFoundError as err :
303+ raise RuntimeError (f"{ stratisd_tools } not found" ) from err
304+
284305 else :
285306 current_message = (
286307 "" if current_return_code == _OK else current_message
You can’t perform that action at this time.
0 commit comments