summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--src/tests/common_dom.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 9e6438e9..f5d0400c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1429,7 +1429,9 @@ libsss_test_common_la_SOURCES = \
src/tests/common.c
libsss_test_common_la_LIBADD = \
$(TALLOC_LIBS) \
- $(TEVENT_LIBS)
+ $(TEVENT_LIBS) \
+ $(LDB_LIBS) \
+ $(NULL)
if HAVE_CHECK
libsss_test_common_la_SOURCES += \
diff --git a/src/tests/common_dom.c b/src/tests/common_dom.c
index 24d1f5a8..1d480017 100644
--- a/src/tests/common_dom.c
+++ b/src/tests/common_dom.c
@@ -22,6 +22,7 @@
#include <talloc.h>
#include <errno.h>
+#include <ldb_module.h>
#include "tests/common.h"
@@ -188,6 +189,9 @@ mock_domain(TALLOC_CTX *mem_ctx,
goto done;
}
+ /* reset ldb error if any */
+ ldb_reset_err_string(sysdb_ctx_get_ldb(domain->sysdb));
+
/* init with an AD-style regex to be able to test flat name */
ret = sss_names_init_from_args(domain,
"(((?P<domain>[^\\\\]+)\\\\(?P<name>.+$))|" \