{
  "_class" : "hudson.tasks.junit.CaseResult",
  "testActions" : [
    
  ],
  "age" : 8,
  "className" : "OmeroPy.test.integration.clitest.test_cleanse.TestCleanseFullAdmin",
  "duration" : 23.86,
  "errorDetails" : "AssertionError: assert not True\u000a +  where True = <function exists at 0x7f5fe2c03420>('/home/omero/workspace/OMERO-test-integration/data/ManagedRepository/3af60d32-dfd4-4f19-a02f-3415e92a88e5_3325/2026-07/11/')\u000a +    where <function exists at 0x7f5fe2c03420> = <module 'posixpath' (frozen)>.exists\u000a +      where <module 'posixpath' (frozen)> = os.path",
  "errorStackTrace" : "self = <test.integration.clitest.test_cleanse.TestCleanseFullAdmin object at 0x7f5f4d8f6890>\u000acapsys = <_pytest.capture.CaptureFixture object at 0x7f5f4100b450>\u000a\u000a    def testCleanseNonsenseName(self, capsys):\u000a        \"\"\"\u000a        Test cleanse removes file on disk after OriginalFile\u000a        name was changed to nonsense and its Image was deleted\u000a        \"\"\"\u000a        # import image and retrieve the OriginalFile\u000a        # (orig_file), its name and path\u000a        image = self.import_fake_file()[0]\u000a        fileset = self.get_fileset([image])\u000a        params = omero.sys.ParametersI()\u000a        params.addId(fileset.getId())\u000a        q = (\"select originalFile.path, originalFile.id \"\u000a             \"from FilesetEntry where fileset.id = :id\")\u000a        queryService = self.root.sf.getQueryService()\u000a        result = queryService.projection(q, params, self.group_ctx)\u000a        path_in_mrepo = result[0][0].getValue()\u000a        orig_file_path = self.make_path(path_in_mrepo)\u000a        assert os.path.exists(orig_file_path)\u000a        orig_file_id = result[0][1].getValue()\u000a        orig_file = self.query.get(\"OriginalFile\", orig_file_id)\u000a        orig_file_name = orig_file.getName().getValue()\u000a        orig_file_path_and_name = self.make_path(path_in_mrepo, orig_file_name)\u000a        assert os.path.isfile(orig_file_path_and_name)\u000a    \u000a        # retrieve the logfile, its name and path\u000a        q = (\"select o from FilesetJobLink l \"\u000a             \"join l.parent as fs join l.child as j \"\u000a             \"join j.originalFileLinks l2 join l2.child as o \"\u000a             \"where fs.id = :id and \"\u000a             \"o.mimetype = 'application/omero-log-file'\")\u000a        logfile = queryService.findByQuery(q, params, self.group_ctx)\u000a        logfile_name = logfile.getName().getValue()\u000a        path_in_mrepo = logfile.getPath().getValue()\u000a        logfile_path = self.make_path(path_in_mrepo)\u000a        assert os.path.exists(logfile_path)\u000a        logfile_path_and_name = self.make_path(path_in_mrepo, logfile_name)\u000a        assert os.path.isfile(logfile_path_and_name)\u000a    \u000a        # change the names of original_file and logfile to nonsense\u000a        name = \"nonsensical\"\u000a        update_service = self.root.sf.getUpdateService()\u000a        orig_file.setName(omero.rtypes.rstring(name))\u000a        update_service.saveAndReturnObject(orig_file, self.group_ctx)\u000a        logfile.setName(omero.rtypes.rstring(name))\u000a        update_service.saveAndReturnObject(logfile, self.group_ctx)\u000a    \u000a        # run the cleanse command, which will not delete\u000a        # the files on disk\u000a        self.args += [self.data_dir]\u000a        self.cli.invoke(self.args, strict=True)\u000a        assert os.path.exists(orig_file_path)\u000a        assert os.path.isfile(orig_file_path_and_name)\u000a        assert os.path.exists(logfile_path)\u000a        assert os.path.isfile(logfile_path_and_name)\u000a    \u000a        # delete the image, which will not delete\u000a        # the files on disk because of the nonsensical name\u000a        # of orig_file and logfile\u000a        command = Delete2(targetObjects={\"Image\": [image.id.val]})\u000a        handle = self.client.sf.submit(command)\u000a        self.wait_on_cmd(self.client, handle)\u000a        assert os.path.exists(orig_file_path)\u000a        assert os.path.isfile(orig_file_path_and_name)\u000a        assert os.path.exists(logfile_path)\u000a        assert os.path.isfile(logfile_path_and_name)\u000a    \u000a        # run cleanse command again, which will now delete the\u000a        # files on disk, the original file, the logfile\u000a        # and their directories\u000a        self.cli.invoke(self.args, strict=True)\u000a        out, err = capsys.readouterr()\u000a        assert not os.path.exists(orig_file_path)\u000a        assert not os.path.isfile(orig_file_path_and_name)\u000a>       assert not os.path.exists(logfile_path)\u000aE       AssertionError: assert not True\u000aE        +  where True = <function exists at 0x7f5fe2c03420>('/home/omero/workspace/OMERO-test-integration/data/ManagedRepository/3af60d32-dfd4-4f19-a02f-3415e92a88e5_3325/2026-07/11/')\u000aE        +    where <function exists at 0x7f5fe2c03420> = <module 'posixpath' (frozen)>.exists\u000aE        +      where <module 'posixpath' (frozen)> = os.path\u000a\u000atest/integration/clitest/test_cleanse.py:155: AssertionError",
  "failedSince" : 1,
  "flakyFailures" : [
    
  ],
  "name" : "testCleanseNonsenseName",
  "properties" : {
    
  },
  "rerunFailures" : [
    
  ],
  "skipped" : False,
  "skippedMessage" : None,
  "status" : "FAILED",
  "stderr" : None,
  "stdout" : None
}