X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmemrm.cc;h=6955f1fa391003a72a9f470ef7bb596ed6b1d46d;hb=e0165c033349179841bd1658f4068a9e4c075f66;hp=8d6109c0ac679084e66662df942d57ce4bd20929;hpb=7773f76bd15be71f7d1a5579006b786584d3fe26;p=awesomized%2Flibmemcached diff --git a/tests/memrm.cc b/tests/memrm.cc index 8d6109c0..6955f1fa 100644 --- a/tests/memrm.cc +++ b/tests/memrm.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include #include -#include +#include using namespace libtest; @@ -84,6 +84,8 @@ static test_return_t rm_test(void *) test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc)); test_compare(MEMCACHED_SUCCESS, rc); + char memrm_buffer[1024]; + snprintf(memrm_buffer, sizeof(memrm_buffer), "--servers=localhost:%d", int(default_port())); const char *args[]= { buffer, "foo", 0 }; test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true)); @@ -121,7 +123,7 @@ static test_return_t NOT_FOUND_TEST(void *) static test_return_t multiple_NOT_FOUND_TEST(void *) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port())); + snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port())); const char *args[]= { buffer, "protocols", "foo", "mine", "bar", "dog", "cat", "foo", "mine", "eye", "for", "the", "to", "not", "know", "what", "I", "should", "be", "doing", 0 }; @@ -146,13 +148,13 @@ collection_st collection[] ={ static void *world_create(server_startup_st& servers, test_return_t& error) { - if (HAVE_MEMCACHED_BINARY == 0) + if (libtest::has_memcached() == false) { error= TEST_SKIPPED; return NULL; } - if (server_startup(servers, "memcached", libtest::default_port(), 0, NULL) == false) + if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false) { error= TEST_FAILURE; } @@ -161,9 +163,9 @@ static void *world_create(server_startup_st& servers, test_return_t& error) } -void get_world(Framework *world) +void get_world(libtest::Framework* world) { - world->collections= collection; - world->_create= world_create; + world->collections(collection); + world->create(world_create); }