From 8bf5237eea4f1afea3656a3385aa4fcdc2f28ffd Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik 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