Bug 36784 - Test rename_class script
Test rename_class script
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: ucs-test
UCS@school 4.1 R2
Other Linux
: P5 normal (vote)
: UCS@school 4.1 R2 vXXX
Assigned To: Sönke Schwardt-Krummrich
Daniel Tröder
: interim-2
Depends on: 37973
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-17 23:55 CET by Sönke Schwardt-Krummrich
Modified: 2023-03-25 06:47 CET (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
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 Sönke Schwardt-Krummrich univentionstaff 2014-11-17 23:55:11 CET
/usr/share/ucs-school-import/scripts contains a script rename_class.
This has to be tested via ucs-test. Please have a look in the UCS@school manual for the syntax of the file.

Besides the obvious checks the test should also include:
- the renamed share object should be still accessable
- the share object should use the same uidNumber/gidNumber settings
- the share directory in file system should not be removed/moved to backup 
  directory; instead the directory has to be renamed while preserving all 
  file/directory permissions and ACLs
- the renamed group object should use the same gidNumber
- the renamed group should still include the same users as before
- ...list is not complete...
Comment 1 Ammar Najjar univentionstaff 2014-11-26 10:46:11 CET
A new script is created with the name: "102_rename_class" to test "rename_class" function, including:
  - Check ldap objects for:
    - Objects (group & share) exists or not.
    - Objects have the correct attributes (gidNumber, memberUid, univentionShareGid, univentionShareUid)
  - Check directory tree permissions before and after renaming the class.
  - Check renaming a class which does not exist (error detection).
  - Check renaming a class to another name which already exists (error detection).
Comment 2 Ammar Najjar univentionstaff 2014-11-26 11:00:17 CET
changelog entry added and package built.
Comment 4 Ammar Najjar univentionstaff 2015-03-10 09:41:37 CET
Because ucs-school-import package is only installed on the master this script is restricted to run on a single server.
Comment 5 Stefan Gohmann univentionstaff 2016-09-07 16:01:40 CEST
(In reply to Ammar Najjar from comment #4)
> Because ucs-school-import package is only installed on the master this
> script is restricted to run on a single server.

Hm, it is currently disabled due to r58770:

-## tags: [apptest, ucsschool]
+## tags: [SKIP-UCSSCHOOL,apptest, ucsschool]

@Sönke, I guess it should be re-enabled?
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2016-10-13 15:28:10 CEST
ucs-test-ucsschool (3.0.16-32):
r73148 | Bug #36784: reenabled test script 102_rename_class

Manual test run on single server was successfull.

Package: ucs-test-ucsschool
Version: 3.0.16-32.306.201610131527
Comment 7 Daniel Tröder univentionstaff 2016-10-14 15:37:13 CEST
OK: code
OK: manual test on single server S4
WAITING: for jenkins results
Comment 8 Daniel Tröder univentionstaff 2016-10-17 10:07:27 CEST
Fails in all jenkins tests with MissingMailDomain: Could not retrieve mail domain from configuration nor from UCRV mail/hosteddomains.

@@ -16,7 +16,10 @@
 import univention.testing.ucr as ucr_test
 import univention.testing.ucsschool as utu
 import univention.testing.utils as utils
+from univention.config_registry import handler_set

@@ -164,6 +164,7 @@
 
 def main():
 	with ucr_test.UCSTestConfigRegistry() as ucr:
+		handler_set(['mail/hosteddomains={}'.format(ucr['domainname'])])
Comment 9 Sönke Schwardt-Krummrich univentionstaff 2016-11-07 12:17:24 CET
(In reply to Daniel Tröder from comment #7)
> WAITING: for jenkins results

After fixing the workaround of bug 42503 the test script ran without problems.
Comment 10 Daniel Tröder univentionstaff 2016-11-10 08:42:02 CET
(In reply to Sönke Schwardt-Krummrich from comment #9)
> (In reply to Daniel Tröder from comment #7)
> > WAITING: for jenkins results
> 
> After fixing the workaround of bug 42503 the test script ran without
> problems.
ACK: tests are stable