Univention Bugzilla – Attachment 5505 Details for
Bug 32554
ucs_registerUDMModule library function
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
revised patches for the tests
1.patch (text/plain), 7.39 KB, created by
Arvid Requate
on 2013-10-08 12:55 CEST
(
hide
)
Description:
revised patches for the tests
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2013-10-08 12:55 CEST
Size:
7.39 KB
patch
obsolete
>Index: univention/testing/udm_extensions.py >=================================================================== >--- univention/testing/udm_extensions.py (Revision 44858) >+++ univention/testing/udm_extensions.py (Arbeitskopie) >@@ -222,7 +222,7 @@ > if not app_id: > app_id = '' > else: >- app_id = 'UNIVENTION_APP_IDENTIFIER="%s"' % app_id >+ app_id = 'export UNIVENTION_APP_IDENTIFIER="%s"' % app_id > if not version_start: > version_start = '' > else: >@@ -269,7 +269,7 @@ > if not app_id: > app_id = '' > else: >- app_id = 'UNIVENTION_APP_IDENTIFIER="%s"' % app_id >+ app_id = 'export UNIVENTION_APP_IDENTIFIER="%s"' % app_id > if not version_start: > version_start = '' > else: >Index: tests/72_udm-extensions/24_update_packageversion >=================================================================== >--- tests/72_udm-extensions/24_update_packageversion (Revision 44858) >+++ tests/72_udm-extensions/24_update_packageversion (Arbeitskopie) >@@ -1,5 +1,5 @@ > #!/usr/share/ucs-test/runner python >-## desc: Change version range of an existing extension >+## desc: Change version of an existing extension > ## tags: [udm-ldapextensions,apptest] > ## roles: [domaincontroller_master,domaincontroller_backup,domaincontroller_slave,memberserver] > ## exposure: dangerous >Index: tests/72_udm-extensions/10_update_extension_via_package >=================================================================== >--- tests/72_udm-extensions/10_update_extension_via_package (Revision 44858) >+++ tests/72_udm-extensions/10_update_extension_via_package (Arbeitskopie) >@@ -31,9 +31,9 @@ > version_start = random_ucs_version(max_major=2) > version_end = random_ucs_version(min_major=5) > >- # create special extension name >+ # create unique extension identifier > extension_identifier = '%s_%s' % (extension_name, package_version.replace('.','_')) >- extension_buffer = get_extension_buffer(extension_type, extension_identifier) >+ extension_buffer = get_extension_buffer(extension_type, extension_name, extension_identifier) > joinscript_buffer = get_join_script_buffer(extension_type, > '/usr/share/%s/%s' % (package_name, extension_filename), > app_id=app_id, >Index: tests/72_udm-extensions/12_update_extension_via_other_packagename >=================================================================== >--- tests/72_udm-extensions/12_update_extension_via_other_packagename (Revision 44858) >+++ tests/72_udm-extensions/12_update_extension_via_other_packagename (Arbeitskopie) >@@ -31,9 +31,9 @@ > version_start = random_ucs_version(max_major=2) > version_end = random_ucs_version(min_major=5) > >- # create special extension name >+ # create unique extension identifier > extension_identifier = '%s_%s' % (extension_name, package_version.replace('.','_')) >- extension_buffer = get_extension_buffer(extension_type, extension_identifier) >+ extension_buffer = get_extension_buffer(extension_type, extension_name, extension_identifier) > joinscript_buffer = get_join_script_buffer(extension_type, > '/usr/share/%s/%s' % (package_name, extension_filename), > app_id=app_id, >Index: tests/72_udm-extensions/41_test_udm_module >=================================================================== >--- tests/72_udm-extensions/41_test_udm_module (Revision 44858) >+++ tests/72_udm-extensions/41_test_udm_module (Arbeitskopie) >@@ -8,7 +8,7 @@ > > from univention.config_registry import ConfigRegistry > import univention.testing.udm as udm_test >-from univention.testing.utils import verify_ldap_object, wait_for_replication_and_postrun, fail >+from univention.testing.utils import verify_ldap_object, wait_for_replication, fail > from univention.testing.strings import random_name, random_version, random_ucs_version > from univention.testing.udm_extensions import * > import subprocess >@@ -43,7 +43,7 @@ > ucsversionend = version_end, > active = 'FALSE') > >- wait_for_replication_and_postrun() >+ wait_for_replication() > udm.stop_cli_server() > > verify_ldap_object(dn, { >@@ -57,14 +57,14 @@ > > }) > >- output = subprocess.Popen(['udm', 'modules'], stdout=subprocess.PIPE).communicate() >+ output, stderr = subprocess.Popen(['udm', 'modules'], stdout=subprocess.PIPE).communicate() > if not extension_name in output: > fail('ERROR: udm cli server has not been reloaded yet or module registration failed') > > extension_dn = udm.create_object(extension_name, position=ucr.get('ldap/base'), name=object_name) > udm.remove_object(extension_name, dn=extension_dn) > >- wait_for_replication_and_postrun() >+ wait_for_replication() > udm.stop_cli_server() > > with udm_test.UCSTestUDM() as udm: >Index: tests/72_udm-extensions/21_listener_version_start_end >=================================================================== >--- tests/72_udm-extensions/21_listener_version_start_end (Revision 44858) >+++ tests/72_udm-extensions/21_listener_version_start_end (Arbeitskopie) >@@ -33,7 +33,7 @@ > ('5.0-0', '9.9-9', False), # range above current version > ('1.0-0', '9.9-9', True), # current version in range > ('1.0-0', '%s-%s' % (ucr.get('version/version'), ucr.get('version/patchlevel')), True), # upper limit of range is current version >- ('%s-%s' % (ucr.get('version/version'), ucr.get('version/patchlevel')), '9.9-9'), True): # lower limit of range is current version >+ ('%s-%s' % (ucr.get('version/version'), ucr.get('version/patchlevel')), '9.9-9', True)): # lower limit of range is current version > > print '=== Testing range from %s to %s with expected result exists=%s ===' % (version_start, version_end, should_exist) > with udm_test.UCSTestUDM() as udm: >Index: tests/72_udm-extensions/11_update_extension_via_package_expected_fail >=================================================================== >--- tests/72_udm-extensions/11_update_extension_via_package_expected_fail (Revision 44858) >+++ tests/72_udm-extensions/11_update_extension_via_package_expected_fail (Arbeitskopie) >@@ -27,9 +27,9 @@ > packages = [] > try: > for package_version in (package_version_HIGH, package_version_LOW): >- # create special extension name >+ # create unique extension identifier > extension_identifier = '%s_%s' % (extension_name, package_version.replace('.','_')) >- extension_buffer = get_extension_buffer(extension_type, extension_identifier) >+ extension_buffer = get_extension_buffer(extension_type, extension_name, extension_identifier) > joinscript_buffer = get_join_script_buffer(extension_type, > '/usr/share/%s/%s' % (package_name, extension_filename), > app_id=app_id, >@@ -45,7 +45,7 @@ > package.install() > > exitcode = call_join_script('66%s.inst' % package_name, fail_on_error=False) >- if package_name == package_version_HIGH: >+ if package_version == package_version_HIGH: > if exitcode: > fail('The join script failed with exitcode %s' % exitcode) > else: >@@ -58,7 +58,7 @@ > content = open(get_absolute_extension_filename(extension_type, extension_filename)).read() > if package_version == package_version_HIGH and not extension_identifier in content: > fail('ERROR: UDM extension of package %d has not been written to disk (%s)' % (len(packages), extension_filename,)) >- if package_version == package_version_LOW and not extension_identifier in content: >+ if package_version == package_version_LOW and extension_identifier in content: > fail('ERROR: the extension update has been performed but should not (old version=%s ; new version=%s)' % (package_version_HIGH, package_version_LOW)) > > finally:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 32554
:
5497
| 5505 |
5536