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

Add tests for Engine.delete_doc()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.5.1
    • Fix Version/s: Not yet scheduled version
    • Component/s: Tests

      Description

      Engine.delete_doc() is only tested at the "action" level in functional/test_engine.py. But while testing 4.5.1 and handling that case, I got a bloody TypeError that our CI must have catched:

      • from a local sync folder, move out a subfolder
      • Drive should ask if I want to cancel or unsync the document
      • clinking on cancel will restore the document (but in my case, I had the exception)

      The error was introduced with NXDRIVE-1768:

      TypeError: scan_remote() takes 1 positional argument but 2 were given
        File "nxdrive/gui/application.py", line 715, in _doc_deleted
        File "nxdrive/engine/engine.py", line 591, in rollback_delete
        File "nxdrive/engine/activity.py", line 263, in func_wrapper
      

      Several tests must be added to cover all possible solutions the user can choose and use the actual code, no mocks.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated: