sssd/0506-dyndns_tests-Fix-unit-test-with-missing-features-in-.patch
Lukas Slebodnik 0a5a392684 Workaround for BZ1537183
unit test will pass but sssd will not be able to use nsupdate with realm
on i686
2018-01-23 15:11:46 +01:00

44 lines
1.6 KiB
Diff

From 8bf5237eea4f1afea3656a3385aa4fcdc2f28ffd Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@fedoraproject.org>
Date: Mon, 22 Jan 2018 17:23:32 +0100
Subject: [PATCH] dyndns_tests: Fix unit test with missing features in nsupdate
We return different string in the function nsupdate_msg_add_realm_cmd
if realm command is not supported by nsupdate.
However cmocka based unit test did not expect such string and failed.
---
src/tests/cmocka/test_dyndns.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/tests/cmocka/test_dyndns.c b/src/tests/cmocka/test_dyndns.c
index fafd4d8a595cc608447d4068eeb0cee2ba819d89..a105dd6e6093c63686ed30384b42d6a942d1ee9f 100644
--- a/src/tests/cmocka/test_dyndns.c
+++ b/src/tests/cmocka/test_dyndns.c
@@ -406,7 +406,11 @@ void dyndns_test_create_fwd_msg(void **state)
assert_string_equal(msg,
"server Winterfell\n"
+#ifdef HAVE_NSUPDATE_REALM
"realm North\n"
+#else
+ "\n"
+#endif
"update delete bran_stark. in A\n"
"update add bran_stark. 1234 in A 192.168.0.2\n"
"send\n"
@@ -423,7 +427,11 @@ void dyndns_test_create_fwd_msg(void **state)
assert_int_equal(ret, EOK);
assert_string_equal(msg,
+#ifdef HAVE_NSUPDATE_REALM
"realm North\n"
+#else
+ "\n"
+#endif
"update delete bran_stark. in A\n"
"update add bran_stark. 1234 in A 192.168.0.2\n"
"send\n"
--
2.15.1