ccs-caldavtester icon indicating copy to clipboard operation
ccs-caldavtester copied to clipboard

Convert code to Python 3

Open claudep opened this issue 4 years ago • 2 comments

This is the first part of the conversion, allowing to launch tests. The second part should be done by running the tests against a complying CalDAV/CardDAV server.

claudep avatar Aug 14 '21 18:08 claudep

I ran this just now to try it in CI: https://drone.owncloud.com/owncloud/core/32455/38/9

+ bash apps/dav/tests/ci/caldav/script.sh
[Thu Sep 16 11:20:00 2021] 127.0.0.1:39868 [207]: /remote.php/dav/
[Thu Sep 16 11:20:00 2021] 127.0.0.1:39876 [201]: /remote.php/dav/calendars/user01/synccalendar1/
[Thu Sep 16 11:20:00 2021] 127.0.0.1:39880 [200]: /remote.php/dav/calendars/user01/shared/
[Thu Sep 16 11:20:00 2021] 127.0.0.1:39884 [207]: /remote.php/dav/calendars/user01/shared/
Unable to import Calendar from pycalendar, ignoring.
Starting tests

File 1 of 3

ests.CalDAV.current-user-principal                          
  Suite: Check for the property on /                        

ests.CalDAV.current-user-principal                             [ERROR]

File 2 of 3

ests.CalDAV.sync-report                                        [ERROR]

File 3 of 3

ests.CalDAV.sharing-calendars                               
  Suite: Read-write calendar                                
    Test: 1                                                       [OK]

ests.CalDAV.sharing-calendars                                  [ERROR]

======================================================================
[ERROR]
FATAL ERROR: No module named 'StringIO'

ests.CalDAV.current-user-principal
======================================================================
[ERROR]
FATAL ERROR: must be str, not bytes

ests.CalDAV.sync-report
======================================================================
[ERROR]
FATAL ERROR: No module named 'StringIO'

ests.CalDAV.sharing-calendars
----------------------------------------------------------------------
Ran 4 tests in 0.914s

FAILED (ok=1, ignored=0, failed=0, errors=3)

It runs - that's a good start :) And 1 of 4 tests passed.

I will look and see if there are obvious things to refactor/fix.

phil-davis avatar Sep 16 '21 11:09 phil-davis

Pushed a fix for the missing StringIO messages. For further debugging, it would be nice if the CI could report tracebacks or at least location of errors.

claudep avatar Sep 22 '21 19:09 claudep