Bug 32554 - ucs_registerUDMModule library function
ucs_registerUDMModule library function
Status: CLOSED FIXED
Product: UCS Test
Classification: Unclassified
Component: UDM
unspecified
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Sönke Schwardt-Krummrich
Arvid Requate
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-11 11:58 CEST by Arvid Requate
Modified: 2013-11-19 06:43 CET (History)
1 user (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
fix some of the tests (5.74 KB, patch)
2013-10-07 21:49 CEST, Arvid Requate
Details | Diff
revised patches for the tests (7.39 KB, patch)
2013-10-08 12:55 CEST, Arvid Requate
Details | Diff
patch for univention.testing.utils.RE_SUFFIX (910 bytes, patch)
2013-10-28 20:49 CET, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2013-09-11 11:58:32 CEST
A test case should be implemented for this. Maybe it's good to implement an ultra-simple UDM module in the test library for this, using the schema defined for Bug 32551.


+++ This bug was initially created as a clone of Bug #32407 +++

A function ucs_registerUDMModule schould be implemented in univention-lib which

* takes the name of an existing UDM module file
* creates an univentionUDMModule object in UDM
* saves the given file to the UDM property "univentionUDMModule"
* sets the UDM property "univentionUDMModuleFilename"
* sets some other attributes useful to track creator package and version number.

* The creator package (.deb) and version number is detected automatically.
* The cn schould reflect <basename of the file>_<version number>.
Comment 1 Arvid Requate univentionstaff 2013-10-07 13:32:08 CEST
* ucs_registerLDAPExtension does not write UNIVENTION_APP_IDENTIFIER to LDAP.

The environment variable needs to be exported. I updated the API documentation for this.
Comment 2 Arvid Requate univentionstaff 2013-10-07 13:34:05 CEST
I would suggest adding a "|| die" to the test joinscript.
Comment 3 Arvid Requate univentionstaff 2013-10-07 21:49:29 CEST
Created attachment 5497 [details]
fix some of the tests
Comment 4 Arvid Requate univentionstaff 2013-10-08 12:55:41 CEST
Created attachment 5505 [details]
revised patches for the tests
Comment 5 Arvid Requate univentionstaff 2013-10-17 16:06:10 CEST
ucs-test is now rebuilt with the patch from Comment 4.
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2013-10-20 00:51:51 CEST
Several checks for ucs_unregisterLDAPExtension have been implemented in 
72_udm-extensions:
- register extension via ucs_unregisterLDAPExtension from join script
- register extension via ucs_unregisterLDAPExtension from postinst script
- filename has been taken over and written to LDAP/disk
- registered file is unmodified written to LDAP
- registered file is unmodified written to disk
- package name has been detected correctly and written to LDAP
- package version has been detected correctly and written to LDAP
- APP_ID has been taken over and written to LDAP
- versionstart and versionend are correctly handled and written to LDAP
- ucs_unregisterLDAPExtension fails if non-join-account is used
- register multiple extensions at a time
- extension may be updated via package with higher version number
- extension may not be updated via package with lower version number
- extension may be updated via other package
- registration with invalid UCS versions should be impossible
- registration of udm modules with xml, multiple icons and multiple translations 
  should be possible
Comment 7 Stefan Gohmann univentionstaff 2013-10-22 13:54:16 CEST
The ucs-test built failed:

dh build
   dh_testdir
   dh_auto_configure
   dh_auto_build
   debian/rules override_dh_auto_test
make[1]: Entering directory `/var/build/temp/tmp.9ygAeiZSOM/3.2-0-0/ucs-test/ucs-test-4.0.149'
ucslint
W:0007-2: debian/changelog: latest changelog entry does not contain bug or ticket number
E:0008-6: tests/72_udm-extensions/es.po: invalid charset (CHARSET) defined
E:0008-6: tests/72_udm-extensions/de.po: invalid charset (CHARSET) defined
E:0008-6: tests/72_udm-extensions/it.po: invalid charset (CHARSET) defined
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2013-10-23 08:46:48 CEST
(In reply to Stefan Gohmann from comment #7)
> E:0008-6: tests/72_udm-extensions/es.po: invalid charset (CHARSET) defined
> E:0008-6: tests/72_udm-extensions/de.po: invalid charset (CHARSET) defined
> E:0008-6: tests/72_udm-extensions/it.po: invalid charset (CHARSET) defined

Fixed by Arvid.
Comment 9 Arvid Requate univentionstaff 2013-10-28 20:49:18 CET
Created attachment 5536 [details]
patch for univention.testing.utils.RE_SUFFIX

* Changelog missing.

* The tests run fine but in the end there is a traceback due to ucs-test considering the .png and .xml files. The attached patch might fix this:

====================================================
Traceback (most recent call last):
  File "/usr/sbin/ucs-test", line 169, in <module>
    main()
  File "/usr/sbin/ucs-test", line 165, in main
    test_set.run_tests(options.filter, options.dry)
  File "/usr/sbin/ucs-test", line 109, in run_tests
    test_case = TestCase().load(fname)
  File "/usr/lib/pymodules/python2.6/univention/testing/data.py", line 507, in load
    raise ValueError('Missing hash-bang')
ValueError: Missing hash-bang
====================================================
Comment 10 Sönke Schwardt-Krummrich univentionstaff 2013-10-29 08:04:44 CET
Thanks for the patch. Applied a variant of it to SVN and rebuild ucs-test.
Comment 11 Arvid Requate univentionstaff 2013-10-29 12:27:43 CET
Changelog?
Comment 12 Sönke Schwardt-Krummrich univentionstaff 2013-10-31 11:39:49 CET
> Changelog?

Changelog entry has been comitted → FIXED
Comment 13 Arvid Requate univentionstaff 2013-10-31 12:15:52 CET
Ok.
Comment 14 Stefan Gohmann univentionstaff 2013-11-19 06:43:02 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".