Created attachment 10578 [details] empty function which should be implemented This is related to bug #52147: Please add a ucs-test that * creates an OU * deletes/modifies objects in it * runs the script * verifies in the scripts captured output, that all errors are caught Work in Progress
I implemented some working test versions on branch troehmey/bug52500_consistency-script-ucs-test: 6260834c6 Bug #52500: implemented first test versions d90c2a058 Bug #52500: first test version (still errorneous) However, I may add some more tests and they still require quite some time to pass. There may be improvements to be made.
Please review my notes at https://git.knut.univention.de/univention/ucsschool/-/commit/6260834c6758545a5088c21836cba10b1143660d
* Applied the notes from comment #2 * Added a new test "test_wrong_school_role_for_each_school" with commit 6a6241e55 Bug #52500: added parametrization; added test Most of the tests still run pretty slow. This is because most test require a fresh ou to be create since they become intentionally erroneous.
Thank you for the changes. Code review is positive. The tests all succeeded on my VM. The tests complete in 2m30s on my VM, that's not to long for isolated integration tests. * test_wrong_school_role_for_each_school doesn't check the 'staff', 'teacher' and 'teacher_and_staff' roles * test_wrong_school_role doesn't check the 'staff' role * test_wrong_group_membership doesn't check the 'staff' and 'teacher' roles
added test cases with commit bf5331441 Bug #52500: added test parameters to test more roles >* test_wrong_school_role_for_each_school doesn't check the 'staff', 'teacher' and 'teacher_and_staff' roles I intentionally did not implement more roles in that test because I trust test_wrong_school_role() on ensuring that this would work for all roles.
OK: all roles are checked OK: except in test_wrong_school_role_for_each_school() as it is already checked in test_wrong_school_role() OK: tests succeed
I will cherry-pick to 4.4 and squash.