#3806 Fix responder-get-domains-tests
Closed: cloned-to-github by pbrezina. Opened by pbrezina.

New sbus implementation broke responder-get-domains-tests and we could not find how to fix it in time. The test affected are parse_inp_call_dp and parse_inp_call_attach.

This is the possible solution but for some reason the __wrap function was not called even though it should be.

diff --git a/Makefile.am b/Makefile.am
index 89011ea41..bf53fd9f9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2718,6 +2718,8 @@ responder_get_domains_tests_SOURCES = \
 responder_get_domains_tests_CFLAGS = \
     $(AM_CFLAGS)
 responder_get_domains_tests_LDFLAGS = \
+    -Wl,-wrap,sss_dp_get_domains_send \
+    -Wl,-wrap,sss_dp_get_domains_recv \
     -Wl,-wrap,sss_parse_name_for_domains \
     -Wl,-wrap,sss_ncache_reset_repopulate_permanent
 responder_get_domains_tests_LDADD = \
diff --git a/src/tests/cmocka/test_responder_common.c b/src/tests/cmocka/test_responder_common.c
index f75bb6f4f..05760046c 100644
--- a/src/tests/cmocka/test_responder_common.c
+++ b/src/tests/cmocka/test_responder_common.c
@@ -35,6 +35,30 @@
 #define NAME "username"
+struct tevent_req *
+__wrap_sss_dp_get_domains_send(TALLOC_CTX *mem_ctx,
+                               struct resp_ctx *rctx,
+                               bool force,
+                               const char *hint)
+{
+    errno_t ret;
+    puts("CALLING WRAPPER SEND");
+
+    ret = sss_resp_populate_cr_domains(rctx);
+    if (ret != EOK) {
+        return NULL;
+    }
+
+    return test_req_succeed_send(mem_ctx, rctx->ev);
+}
+
+errno_t
+__wrap_sss_dp_get_domains_recv(struct tevent_req *req)
+{
+    puts("CALLING WRAPPER RECV");
+    return test_request_recv(req);
+}
+

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/4801

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @pbrezina:
- Issue close_status updated to: cloned-to-github
- Issue status updated to: Closed (was: Open)

Metadata