Bug 50631 - Migrate ucs-test to Python 3
Migrate ucs-test to Python 3
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: Framework
unspecified
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Owen Synge
Florian Best
: interim-7
: 40707 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-12-12 09:01 CET by Florian Best
Modified: 2023-07-26 15:25 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-12-12 09:01:35 CET
ucs-test should be migrated to Python 3.
Comment 1 Florian Best univentionstaff 2019-12-17 09:55:27 CET
ucs-test (9.0.3-129)
61a9424b02b9 | Bug #50631: futurize -wn -f libfuturize.fixes.fix_print_with_import
06d496d867c6 | Bug #50631: migrate from optparse to argparse
2cd4035828a4 | Bug #50631: add Python 3 compatibility
Comment 3 Florian Best univentionstaff 2020-09-09 09:12:58 CEST
(In reply to Erik Damrose from comment #2)
> The tests has been running since 28.8. and has been failing since. Please
> take a look.
> 
> https://jenkins.knut.univention.de:8181/job/UCS-4.4/job/UCS-4.4-5/job/
> AutotestUpgrade/lastCompletedBuild/SambaVersion=s4,Systemrolle=master/
> testReport/60_umc/17_traceback_handling/master071/

Sorry, fixed in git:5b4c67fdf22975cf575322a96651013c8ff64fa0
Comment 4 Sebastian Lobinger univentionstaff 2021-03-18 10:01:17 CET
There are many tests that fail in python3. I will have a look on their tracebacks which of them are easy to fix and try fix those.
The following tests are not working with python3 but in python2:

./10_ldap/26reconnect_univention_ldapsearch
./10_ldap/41listener_module_api_test
./10_ldap/27reconnect_uldap_2
./10_ldap/24uldap
./72_udm-extensions/40_test_py2_and_3_udm_hook
./72_udm-extensions/07_register_and_verify_all
./72_udm-extensions/08_register_with_special_name_and_verify_all
./72_udm-extensions/41_test_py2_and_3_udm_module
./72_udm-extensions/30_file_integrity
./72_udm-extensions/41_remove_py2_only_udm_module
./72_udm-extensions/04_register_and_verify_test_app_id
./72_udm-extensions/42_test_py3_only_udm_syntax
./72_udm-extensions/40_test_py3_only_udm_hook
./72_udm-extensions/42_test_py2_and_3_udm_syntax
./72_udm-extensions/21_listener_version_start_end
./72_udm-extensions/40_remove_py2_only_udm_hook
./72_udm-extensions/23_rename_object
./72_udm-extensions/32_file_integrity_udm_module
./72_udm-extensions/26_create_with_invalid_ucsversions
./72_udm-extensions/25_listener_check_active
./72_udm-extensions/42_keep_but_dont_activate_py2_only_udm_syntax
./72_udm-extensions/41_test_py3_only_udm_module
./72_udm-extensions/31_filename_attack
./72_udm-extensions/02_register_deregister_via_postinst
./72_udm-extensions/22_listener_version_change
./72_udm-extensions/41_keep_but_dont_activate_py2_only_udm_module
./72_udm-extensions/03_register_and_verify_ldap_object
./72_udm-extensions/01_register_deregister_via_joinscript
./72_udm-extensions/05_register_and_verify_version_start_end
./72_udm-extensions/24_update_packageversion
./72_udm-extensions/20_create_via_udm_cli
./72_udm-extensions/42_remove_py2_only_udm_syntax
./72_udm-extensions/40_keep_but_dont_activate_py2_only_udm_hook
./71_udm-settings/50_create_data
./71_udm-settings/35_create_ldap_acl
./71_udm-settings/37_create_invalid_ldap_acl
./71_udm-settings/31_create_full_ldap_schema
./71_udm-settings/51_register_data
./71_udm-settings/30_create_ldap_schema
./71_udm-settings/36_create_full_ldap_acl
./71_udm-settings/32_create_invalid_ldap_schema
./01_base/45udm-cli
./01_base/26check_admin_user
./01_base/01_ignore_synced_clients_in_license_count
./01_base/01_ignore_disabled_users_in_license_count
./01_base/00_univention-license-check
./01_base/01_ignore_synced_users_in_license_count
./60_umc/76_ipchange_ucs_sso
./60_umc/11_notifier_crash
./60_umc/75_ipchange_basic
./03_ucr/71ucr_multiple_register
./03_ucr/70_ucr_true_false_values
./61_udm-users/53_udm_users_user_bcrypt_password
./82_saml/04_saml_login
./82_saml/21_download_metadata
./82_saml/07_umc_session_timeout
./82_saml/08_saml_session_ldap_after_restart
./82_saml/25_broken_idp_metadata
./82_saml/26_saml_umc_sp_server
./82_saml/20_ucs_sso
./82_saml/13_saml_wrong_password
./82_saml/27_renewed_idp_cert
./82_saml/10_saml_password_expire
./82_saml/30_umc_cert_chain
./82_saml/22_saml_idp_server
./82_saml/44_idp_entityID_supplement
./82_saml/28_saml_sp_metadata_replication
./82_saml/11_saml_user_expire
./82_saml/32_umc_upgrade_session
./82_saml/24_download_certificate
./82_saml/12_saml_no_user
./82_saml/33_change_expired_password
./82_saml/31_umc_wrong_cert
./11_join/10join_preexisting_acc_with_multiple_macs
./66_udm-computers/58_removal_of_leftover_ptr_record_with_multiple_ip_addresses
Comment 5 Florian Best univentionstaff 2021-04-23 01:30:51 CEST
ucs-test now runs with Python 3.
Every univention.testing lib is Py3 compatible except for ldiff.py

ucs-test (10.0.5-1)
0c683bbb969c | fixup! Bug #50631: Migrate ucs-test to Python 3
dd48df0efe13 | fixup! Bug #50631: Migrate ucs-test to Python 3
0d63bddb0c3d | Bug #50631: Migrate ucs-test to Python 3
Comment 6 Florian Best univentionstaff 2021-05-03 10:14:14 CEST
(In reply to Florian Best from comment #5)
> ucs-test now runs with Python 3.
> Every univention.testing lib is Py3 compatible except for ldiff.py
Philipp did that in:

ucs-test (10.0.5-13)               
9f715106099b | fix[ucstest/ldif]: Fix Python 3 encoding             
fc3e74ca6553 | fix[ucstest/ldif]: tuple() -> list()          
440c42dfae33 | fix[ucstest/licence]: Convert to Python 3
52e2081a05ac | fix[ucstest/licence]: Drop UCR instance
a62d9fad889f | refactor[ucstest]: force_drs_replication()
e04f906ddcaa | fix[ucstest]: Convert to stream processing  
47f85bd1988b | fix[ucstest]: PEP 484 type errors           
b6b7dd91798f | style[ucs-test]: Assorted cleanups           
e0895b8598d6 | refactor[ucs-test]: random functions
6ed9da19bfdd | refactor[ucs-test]: Merge implementations
602fc0cea7d0 | fix[ucs-test]: @setTimeout()               
533f4f88b754 | refactor[ucs-test]: FollowLogfile
ebf655b7e36c | style[ucs-test]: Move module description
de05e7425007 | style[ucs-test]: Double str() conversion                  
e66947903c83 | style[ucs-test]: Use str % ucr
08aeeb9d6358 | fix[ucs-test]: Wrong string format
8db5fb8652d3 | refactor[ucs-test]: Use str.center()
8050590ead58 | refactor[ucs-test]: Use with open() 
28d00673ac10 | refactor[ucs-test]: Use subprocess.Popen(cwd=)
10e883375b31 | style[ucs-test]: Raise exception instance
cb2e0619d0ec | fix[ucs-test/coverage]: Python version detection 
175ee60746cc | doc[ucs-test/coverage]: Drop default arguments
61f440b1a3b9 | style[ucs-test]: Use dict/list/set comprehension 2
1b91a46ccffc | style[ucs-test]: Use dict/list/set comprehension
Comment 7 Florian Best univentionstaff 2021-05-05 13:26:15 CEST
OK: ucs-test successfully running with Python 3.
Comment 8 Florian Best univentionstaff 2021-05-25 16:00:30 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".
Comment 9 Philipp Hahn univentionstaff 2023-07-26 15:25:35 CEST
*** Bug 40707 has been marked as a duplicate of this bug. ***