From f78663990f821627db181834baf708ce492cf0d2 Mon Sep 17 00:00:00 2001 From: William Brown Date: Mar 15 2017 02:58:20 +0000 Subject: Ticket 49172 - Fix test schema files Bug Description: This issue has two points. First, is that we were not handling conditions where schema was empty, so we got a none type back. Second, schema handling moves in 1.3.6, to the join systemschema dir and schemadir. We should be reflective of this in our test, which requires and update to the defaults.inf to list the path. Fix Description: Update defaults.inf, and the test to correctly handle none. https://pagure.io/389-ds-base/issue/49172 Author: wibrown Review by: mreynolds (thanks!) --- diff --git a/dirsrvtests/tests/suites/schema/test_schema.py b/dirsrvtests/tests/suites/schema/test_schema.py index 10838f1..23dae71 100644 --- a/dirsrvtests/tests/suites/schema/test_schema.py +++ b/dirsrvtests/tests/suites/schema/test_schema.py @@ -129,8 +129,12 @@ def test_schema_comparewithfiles(topology_st): for fn in schemainst.schema.list_files(): try: fschema = schemainst.schema.file_to_subschema(fn) + if fschema is None: + raise Exception("Empty schema file %s" % fn) except: log.warn("Unable to parse %s as a schema file - skipping" % fn) + continue + log.info("Parsed %s as a schema file - checking" % fn) for oid in fschema.listall(occlass): se = fschema.get_obj(occlass, oid) assert se diff --git a/ldap/admin/src/defaults.inf.in b/ldap/admin/src/defaults.inf.in index 31dbf2f..77d27b1 100644 --- a/ldap/admin/src/defaults.inf.in +++ b/ldap/admin/src/defaults.inf.in @@ -36,6 +36,7 @@ run_dir = @localstatedir@/run/dirsrv pid_file = @localstatedir@/run/dirsrv/slapd-{instance_name}.pid inst_dir = @serverdir@ plugin_dir = @serverplugindir@ +system_schema_dir = @systemschemadir@ ; These values can be altered in an installation of ds user = dirsrv