Univention Bugzilla – Bug 34279
ucs-test: check UCR variable ucsschool/singlemaster
Last modified: 2014-06-12 09:20:56 CEST
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".
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 ] then echo "$ucsschool_singlemaster" elif [ -z "$ucsschool_singlemaster" ] then echo "false" fi
#!/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(): try: ucr = ucr_test.UCSTestConfigRegistry() ucr.load() if ucr.get('ucsschool/singlemaster'): print ucr.get('ucsschool/singlemaster') else: print "false" sys.exit(0) except Exception, e: print e sys.exit(1) if __name__ == '__main__': main()
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.
OK: Implementation OK: Test Entry in UCS@school 3.2R2 changelog has been added.
UCS@school 3.2 R2 has been released: http://docs.univention.de/release-notes-ucsschool-3.2R2-de.html If this error occurs again, please use "Clone This Bug".