[SSSD] [PATCH] tests: Fix the order of key/values

Jakub Hrozek jhrozek at redhat.com
Wed Apr 17 18:56:35 UTC 2013


I found out that the code to add custom options to confdb during tests
had the key/value order reversed on one place. The attached patch fixes
that.
-------------- next part --------------
>From 6ae5aca0134b4d7532213562c5cb228b99eabf98 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Mon, 15 Apr 2013 16:42:45 +0200
Subject: [PATCH] tests: Fix the order of key/values

---
 src/tests/common_dom.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/tests/common_dom.c b/src/tests/common_dom.c
index 31b2590cc2257815811c3c80f57b6c0991a1a728..00e7f5ae2bfc972b8a61982c54bc5df70cbbcb20 100644
--- a/src/tests/common_dom.c
+++ b/src/tests/common_dom.c
@@ -85,9 +85,10 @@ create_dom_test_ctx(TALLOC_CTX *mem_ctx,
 
     if (params) {
         for (i=0; params[i].key; i++) {
-            val[0] = params[i].key;
+            val[0] = params[i].value;
             ret = confdb_add_param(test_ctx->confdb, true,
-                                   dompath, params[i].value, val);
+                                   dompath, params[i].key,
+                                   val);
             if (ret != EOK) {
                 DEBUG(SSSDBG_CRIT_FAILURE,
                       ("cannot add parameter %s: %d\n", params[i].key, ret));
-- 
1.8.1.4



More information about the sssd-devel mailing list