summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r--xlators/cluster/dht/src/Makefile.am15
-rw-r--r--xlators/cluster/dht/src/dht-layout.c21
2 files changed, 0 insertions, 36 deletions
diff --git a/xlators/cluster/dht/src/Makefile.am b/xlators/cluster/dht/src/Makefile.am
index 3032705b5d5..174bea84110 100644
--- a/xlators/cluster/dht/src/Makefile.am
+++ b/xlators/cluster/dht/src/Makefile.am
@@ -36,18 +36,3 @@ uninstall-local:
install-data-hook:
ln -sf dht.so $(DESTDIR)$(xlatordir)/distribute.so
-
-#### UNIT TESTS #####
-CLEANFILES += *.gcda *.gcno *_xunit.xml
-noinst_PROGRAMS =
-TESTS =
-
-dht_layout_unittest_CPPFLAGS = $(UNITTEST_CPPFLAGS) $(AM_CPPFLAGS)
-dht_layout_unittest_SOURCES = unittest/dht_layout_unittest.c \
- unittest/dht_layout_mock.c \
- dht-layout.c
-dht_layout_unittest_CFLAGS = $(UNITTEST_CFLAGS)
-dht_layout_unittest_LDADD = $(UNITTEST_LDADD)
-dht_layout_unittest_LDFLAGS = $(UNITTEST_LDFLAGS)
-noinst_PROGRAMS += dht_layout_unittest
-TESTS += dht_layout_unittest
diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c
index deaa493f908..e1a37b77cda 100644
--- a/xlators/cluster/dht/src/dht-layout.c
+++ b/xlators/cluster/dht/src/dht-layout.c
@@ -25,29 +25,12 @@
#define layout_size(cnt) (layout_base_size + (cnt * layout_entry_size))
-#include <cmockery/pbc.h>
-#include <cmockery/cmockery_override.h>
-
-// Change GF_CALLOC and GF_FREE to use
-// cmockery2 memory allocation versions
-#ifdef UNIT_TESTING
-#undef GF_CALLOC
-#define GF_CALLOC(n, s, t) test_calloc(n, s)
-#undef GF_FREE
-#define GF_FREE test_free
-#endif
-
-
-
dht_layout_t *
dht_layout_new (xlator_t *this, int cnt)
{
dht_layout_t *layout = NULL;
dht_conf_t *conf = NULL;
- REQUIRE(NULL != this);
- REQUIRE(cnt >= 0);
-
conf = this->private;
layout = GF_CALLOC (1, layout_size (cnt),
@@ -66,10 +49,6 @@ dht_layout_new (xlator_t *this, int cnt)
layout->ref = 1;
- ENSURE(NULL != layout);
- ENSURE(layout->type == DHT_HASH_TYPE_DM);
- ENSURE(layout->cnt == cnt);
- ENSURE(layout->ref == 1);
out:
return layout;
}