Univention Bugzilla – Full Text Bug Listing |
Summary: | Add test case 90_ucsschool/141_check_DNS_settings | ||
---|---|---|---|
Product: | UCS@school | Reporter: | Stefan Gohmann <gohmann> |
Component: | ucs-test | Assignee: | Richard Ulmer <ulmer> |
Status: | CLOSED FIXED | QA Contact: | Florian Best <best> |
Severity: | normal | ||
Priority: | P5 | CC: | gohmann, grandjean, schwardt, walkenhorst |
Version: | UCS@school 4.0 R2 | ||
Target Milestone: | UCS@school 4.1 R2 v10 | ||
Hardware: | Other | ||
OS: | Linux | ||
What kind of report is it?: | Development Internal | 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: | |||
Bug Depends on: | 39384 | ||
Bug Blocks: | |||
Attachments: | patch |
Description
Stefan Gohmann
2016-01-20 13:28:33 CET
I've added two tests. One checking that the UCRVs for slaves are set correctly. Another one for checking that the school servers are not added to DNS AUTHORITY SECTION (for slaves and masters). svn commit: 75383 + 75384 + 75385 build: 3.0.17-37.358.201612191229 The test cases are 90_ucsschool/140_check_Domain_Users_policies and 00_checks/30_check_DNS_UCRVs. They are currently skipped, due to a missing tag (I think "apptest"): http://jenkins.knut.univention.de:8080/job/UCSschool%204.1/job/UCSschool%204.1%20(R2)%20Multiserver/lastCompletedBuild/SambaVersion=s4-school-only/testReport/90_ucsschool/140_check_Domain_Users_policies/test/ Please adjust the test cases according to the patch in Bug #40471: * Create a school * use a main() function * start the "desc" in the first line * use lo.get() instead of lo.search() to get the relevant objects. * set the exposure to dangerous * use assertions/exception instead of sys.exit/utils.fail The suggestions from Florian have been integrated and the tests seem to work. They have already found one bad test-environment: http://jenkins.knut.univention.de:8080/job/UCSschool%204.1/job/UCSschool%204.1%20(R2)%20Singleserver/lastCompletedBuild/ImportTests=NoImportTests,SambaVersion=s4-with-slave/testReport/ svn commit: 75590 + 75592 build: 3.0.17-45.366.201701051256 90_ucsschool/141_check_DNS_settings: 19 » » zone_name = ".".join([rdn[3:] for rdn in ldap_base.split(',')]) 20 21 » » school_server = ucr.get('hostname') + "." + zone_name 22 23 » » zone = lo.get(filter_format('zoneName=%s,cn=dns,%s', (zone_name, ldap_base))) Please use ucr.get('domainname') instead of the ldap-base for the zone name. filter_format is wrong here, as the argument of lo.get() is a DN and not a search filter. You have to escape the zone_name value with ldap.dn.escape_dn_chars(). The latest hints from Florian have now been used as well. svn commit: 75657 build: 3.0.17-46.367.201701101452 Created attachment 8355 [details]
patch
The test script only detects zones under cn=dns,dc=base. I think it is better to make a search, so that no zone anywhere uses this value.
I have committed and build Florians suggested changes and the tests seems to work properly. svn commit: 76018 build: 3.0.17-47.368.201701231639 Nice :) |