Bug 34279 - ucs-test: check UCR variable ucsschool/singlemaster
ucs-test: check UCR variable ucsschool/singlemaster
Product: UCS@school
Classification: Unclassified
Component: ucs-test
UCS@school 3.2 R2
Other Linux
: P5 normal (vote)
: UCS@school 3.2 R2
Assigned To: Ammar Najjar
Sönke Schwardt-Krummrich
Depends on:
  Show dependency treegraph
Reported: 2014-03-06 17:34 CET by Sönke Schwardt-Krummrich
Modified: 2014-06-12 09:20 CEST (History)
0 users

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:


Note You need to log in before you can comment on or make changes to this bug.
Description Sönke Schwardt-Krummrich univentionstaff 2014-03-06 17:34:07 CET
A ucs-test script should check if the UCR variable ucsschool/singlemaster is correctly set on the domaincontroller_master with installed UCS@school.

The script should be only run on domaincontroller_master and should depend from one of the following packages: ucs-school-master or ucs-school-singlemaster.
If the variable is unset, it should be considered as value "false".
Comment 1 Ammar Najjar univentionstaff 2014-03-07 10:16:02 CET
dpkg -s ucs-school-master >/dev/null 2>&1 && {
        echo "ucs-school-master is installed."
    } || {
        echo "ucs-school-master is not installed."
dpkg -s ucs-school-singlemaster >/dev/null 2>&1 && {
        echo "ucs-school-singlemaster is installed."
    } || {
        echo "ucs-school-singlemaster is not installed."
eval "$(univention-config-registry shell ucsschool/singlemaster)"
if [ $ucsschool_singlemaster ]
        echo "$ucsschool_singlemaster"
elif [ -z "$ucsschool_singlemaster" ]
        echo "false"
Comment 2 Ammar Najjar univentionstaff 2014-03-07 12:11:29 CET
#!/usr/share/ucs-test/runner python
## desc: ucs-school-singlemaster-check
## roles: [domaincontroller_master]
## tags: [apptest]
## exposure: safe
## packages:
##   - ucs-school-master | ucs-school-singlemaster

import univention.testing.ucr as ucr_test
import sys

def main():
                ucr = ucr_test.UCSTestConfigRegistry()
                if ucr.get('ucsschool/singlemaster'):
                        print  ucr.get('ucsschool/singlemaster')
                        print "false"
        except Exception, e:
                print e

if __name__ == '__main__':
Comment 3 Ammar Najjar univentionstaff 2014-03-17 09:58:49 CET
Test name: ucs-school-singlemaster-check
requires: ucs-school-master or ucs-school-singlemaster
Checks if the variable 'ucsschool/singlemaster' is set to the correct value, succeeds if true.
Comment 4 Sönke Schwardt-Krummrich univentionstaff 2014-04-14 21:44:07 CEST
OK: Implementation
OK: Test
Entry in UCS@school 3.2R2 changelog has been added.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2014-06-12 09:19:27 CEST
UCS@school 3.2 R2 has been released:

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