aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/test_namestore_api_lookup_shadow.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2013-11-04 16:27:48 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2013-11-04 16:27:48 +0000
commita5328c2a96b9582585511c1ce1aee08509eb0c0a (patch)
treeec56747e03a362c9efd857a7123714c993a64aac /src/namestore/test_namestore_api_lookup_shadow.c
parent90d532b2a3770ba8e34135484d303c6f53dbb820 (diff)
downloadgnunet-a5328c2a96b9582585511c1ce1aee08509eb0c0a.tar.gz
gnunet-a5328c2a96b9582585511c1ce1aee08509eb0c0a.zip
minor fixes + test for shadows record filtering and usage
Diffstat (limited to 'src/namestore/test_namestore_api_lookup_shadow.c')
-rw-r--r--src/namestore/test_namestore_api_lookup_shadow.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/namestore/test_namestore_api_lookup_shadow.c b/src/namestore/test_namestore_api_lookup_shadow.c
index 6f9fd5638..2c614998f 100644
--- a/src/namestore/test_namestore_api_lookup_shadow.c
+++ b/src/namestore/test_namestore_api_lookup_shadow.c
@@ -18,8 +18,8 @@
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20/** 20/**
21 * @file namestore/test_namestore_api.c 21 * @file namestore/test_namestore_api_lookup_shadow_filter.c
22 * @brief testcase for namestore_api.c: store a record and perform a lookup 22 * @brief testcase for namestore_api.c: store a shadow record and perform a lookup
23 */ 23 */
24#include "platform.h" 24#include "platform.h"
25#include "gnunet_namecache_service.h" 25#include "gnunet_namecache_service.h"
@@ -113,9 +113,18 @@ rd_decrypt_cb (void *cls,
113{ 113{
114 char rd_cmp_data[TEST_RECORD_DATALEN]; 114 char rd_cmp_data[TEST_RECORD_DATALEN];
115 115
116 GNUNET_assert (1 == rd_count); 116 if (1 != rd_count)
117 GNUNET_assert (NULL != rd); 117 {
118 118 GNUNET_SCHEDULER_add_now (&endbadly, NULL);
119 GNUNET_break (0);
120 return;
121 }
122 if (NULL == rd)
123 {
124 GNUNET_SCHEDULER_add_now (&endbadly, NULL);
125 GNUNET_break (0);
126 return;
127 }
119 memset (rd_cmp_data, 'a', TEST_RECORD_DATALEN); 128 memset (rd_cmp_data, 'a', TEST_RECORD_DATALEN);
120 129
121 GNUNET_assert (TEST_RECORD_TYPE == rd[0].record_type); 130 GNUNET_assert (TEST_RECORD_TYPE == rd[0].record_type);
@@ -244,4 +253,4 @@ main (int argc, char *argv[])
244} 253}
245 254
246 255
247/* end of test_namestore_api_lookup_public.c */ 256/* end of test_namestore_api_lookup_shadow_filter.c */