Bug 31652 - Adoption of udm-users tests from ucs-3.0
Adoption of udm-users tests from ucs-3.0
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: UDM
unspecified
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Lukas Walter
Stefan Gohmann
: interim-1
Depends on:
Blocks: 27664
  Show dependency treegraph
 
Reported: 2013-06-05 17:08 CEST by Lukas Walter
Modified: 2013-11-19 06:44 CET (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 Lukas Walter univentionstaff 2013-06-05 17:08:40 CEST
The udm-users tests should be adopted from ucs-3.0.
Comment 1 Lukas Walter univentionstaff 2013-06-07 17:06:42 CEST
Tests have been adopted.
Comment 2 Stefan Gohmann univentionstaff 2013-06-16 14:41:13 CEST
As far as I understand the header has to be started as the second line:

tests/61_udm-users/35_create_user_with_umlaut_in_uid
#!/usr/share/ucs-test/runner python
# -*- coding: utf-8 -*-
## desc: Create user with umlaut in username
## tags: [udm-users]
## roles: [domaincontroller_master]

The test is started on non DC Master roles, see 
http://jenkins.knut.univention.de:8080/job/autotest/4/testReport/

Is the coding line required? If so, we should change the framework, otherwise the line should be removed.
Comment 3 Philipp Hahn univentionstaff 2013-06-17 11:05:06 CEST
(In reply to Stefan Gohmann from comment #2)
> As far as I understand the header has to be started as the second line:
> 
> tests/61_udm-users/35_create_user_with_umlaut_in_uid
> #!/usr/share/ucs-test/runner python
> # -*- coding: utf-8 -*-
> ## desc: Create user with umlaut in username

That happened for an other test, too: As a workaround move the encoding hint to the last line of the file.
A better long term solution would be to teach ucs-test to ignore comment lines with only one hash symbol at the head of the file until the ucs-test header starts.
Comment 4 Lukas Walter univentionstaff 2013-06-17 16:42:30 CEST
I have modified ucs-test to ignore lines beginning with a single hashtag in the test header.
Comment 5 Stefan Gohmann univentionstaff 2013-06-20 15:21:42 CEST
As discussed, the univention-ox check should be removed.
Comment 6 Lukas Walter univentionstaff 2013-06-24 11:20:54 CEST
(In reply to Stefan Gohmann from comment #5)
> As discussed, the univention-ox check should be removed.

Done.
Comment 7 Stefan Gohmann univentionstaff 2013-07-19 11:29:18 CEST
Some minor issues:

01_user_creation_samba_option: 
 utils.verify_ldap_object(udm.create_user(primaryGroup = 'cn=Domain Admins,cn=groups,%s' % ucr['ldap/base'], options = ['samba'])[0])

Please use separate calls, for example:
 user = udm.create_user(primaryGroup = 'cn=Domain Admins,cn=groups,%s' % ucr['ldap/base'], options = ['samba'])
 utils.verify_ldap_object(user[0])

The same in this test cases:
  03_user_creation_samba_kerberos_options
  04_user_creation_kerberos_posix_options
  05_user_creation_kerberos_person_options
  06_user_creation_person_option
  06_user_creation_posix_option
  07_user_creation_without_samba_option
  08_user_creation_without_mail_option
  09_user_creation_without_kerberos_option
  10_user_creation_without_person_option
  19_user_creation_with_umlaut_in_username
  20_user_creation_person_mail_options
  
11_user_creation_without_posix_option: the test does not check if the object was created.

12_user_creation_with_username_already_in_use: the test case should use a different container.

14_user_creation_with_uid_already_in_use: please use in the test description and as variable name uidNumber because uid is by default a different attribute at least in ldap.

18_user_creation_set_jpegPhoto: please use a real jpeg example
Comment 8 Lukas Walter univentionstaff 2013-07-19 17:33:02 CEST
The mentioned points have been implemented.
Comment 9 Stefan Gohmann univentionstaff 2013-08-15 15:29:59 CEST
Some more minor issues:

* 12_user_creation_with_username_already_in_use + 
23_user_creation_with_username_already_in_use_apptest: we should not add such specific apptest tests here. I think these tests are obsolete since we changed the app default behavior: Bug #32212

* 00_user_creation: the user deletion should be checked as well
Comment 10 Lukas Walter univentionstaff 2013-08-19 09:31:51 CEST
(In reply to Stefan Gohmann from comment #9)

> Some more minor issues:
> 
> * 12_user_creation_with_username_already_in_use + 
> 23_user_creation_with_username_already_in_use_apptest: we should not add
> such specific apptest tests here. I think these tests are obsolete since we
> changed the app default behavior: Bug #32212

The apptest version tests have been removed, in return I have added the "apptest" tag to the related udm-users tests again.


> * 00_user_creation: the user deletion should be checked as well

I've added a test for that.
Comment 11 Stefan Gohmann univentionstaff 2013-08-20 12:15:00 CEST
(In reply to Lukas Walter from comment #10)
> (In reply to Stefan Gohmann from comment #9)
> 
> > Some more minor issues:
> > 
> > * 12_user_creation_with_username_already_in_use + 
> > 23_user_creation_with_username_already_in_use_apptest: we should not add
> > such specific apptest tests here. I think these tests are obsolete since we
> > changed the app default behavior: Bug #32212
> 
> The apptest version tests have been removed, in return I have added the
> "apptest" tag to the related udm-users tests again.

OK

> > * 00_user_creation: the user deletion should be checked as well
> 
> I've added a test for that.

OK
Comment 12 Stefan Gohmann univentionstaff 2013-11-19 06:44:08 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".