Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-783

Fix test_remote_rename_file systematically failing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.1
    • Component/s: Tests

      Description

      14:50:28 [SLAVE] [INFO]      [exec] =========================== short test summary info ============================
      14:50:28 [SLAVE] [INFO]      [exec] FAIL nuxeo-drive-client/tests/test_remote_move_and_rename.py::TestRemoteMoveAndRename::test_remote_rename_file
      14:50:28 [SLAVE] [INFO]      [exec] =================================== FAILURES ===================================
      14:50:28 [SLAVE] [INFO]      [exec] _______________ TestRemoteMoveAndRename.test_remote_rename_file ________________
      14:50:28 [SLAVE] [INFO]      [exec] self = <tests.test_remote_move_and_rename.TestRemoteMoveAndRename testMethod=test_remote_rename_file>
      14:50:28 [SLAVE] [INFO]      [exec]     def test_remote_rename_file(self):
      14:50:28 [SLAVE] [INFO]      [exec]         remote_client = self.remote_client_1
      14:50:28 [SLAVE] [INFO]      [exec]         local_client = self.local_client_1
      14:50:28 [SLAVE] [INFO]      [exec]         file_1_docref = self.file_1_id.split("#")[-1]
      14:50:28 [SLAVE] [INFO]      [exec]         file_1_version = self.remote_document_client_1.get_info(file_1_docref).version
      14:50:28 [SLAVE] [INFO]      [exec]         # Rename /Original File 1.txt to /Renamed File 1.txt
      14:50:28 [SLAVE] [INFO]      [exec]         remote_client.rename(self.file_1_id, u'Renamed File 1.txt')
      14:50:28 [SLAVE] [INFO]      [exec]         self.assertEqual(remote_client.get_info(self.file_1_id).name,
      14:50:28 [SLAVE] [INFO]      [exec]             u'Renamed File 1.txt')
      14:50:28 [SLAVE] [INFO]      [exec]         self.wait_sync(wait_for_async=True)
      14:50:28 [SLAVE] [INFO]      [exec]         version = self.remote_document_client_1.get_info(file_1_docref).version
      14:50:28 [SLAVE] [INFO]      [exec]         # Check remote file name
      14:50:28 [SLAVE] [INFO]      [exec]         self.assertEqual(remote_client.get_info(self.file_1_id).name, u'Renamed File 1.txt')
      14:50:28 [SLAVE] [INFO]      [exec] >       self.assertEqual(file_1_version, version, "Version should not increased")
      14:50:28 [SLAVE] [INFO]      [exec] E       AssertionError: Version should not increased
      14:50:28 [SLAVE] [INFO]      [exec] file_1_docref = '06629f97-e158-4dc5-a795-c3bf473600f0'
      14:50:28 [SLAVE] [INFO]      [exec] file_1_version = '0.1'
      14:50:28 [SLAVE] [INFO]      [exec] local_client = <nxdrive.client.local_client.LocalClient object at 0x7f9509dba8d0>
      14:50:28 [SLAVE] [INFO]      [exec] remote_client = <RemoteFileSystemClient blob_timeout=60, check_suspended=None, client_version=...UL3SF5V2PSVOUZC4CRBQLRIA/tmp/tmp6_Yaz6-nxdrive-uploads', user_id='driveuser_1'>
      14:50:28 [SLAVE] [INFO]      [exec] self       = <tests.test_remote_move_and_rename.TestRemoteMoveAndRename testMethod=test_remote_rename_file>
      14:50:28 [SLAVE] [INFO]      [exec] version    = '0.2'
      14:50:28 [SLAVE] [INFO]      [exec] nuxeo-drive-client/tests/test_remote_move_and_rename.py:298: AssertionError
      

      This happens since NXP-21275 because the Note documents are always versioned on save.

      Let's always use .odt instead of .txt in the tests to create File instead of Note documents.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: