#include "HttpReply.h"
#include "StoreFileSystem.h"
+#define TESTDIR "testCoss__testCossSearch"
+
CPPUNIT_TEST_SUITE_REGISTRATION( testCoss );
typedef RefCount<CossSwapDir> SwapDirPointer;
void
testCoss::testCossCreate()
{
- if (0 > system ("rm -rf testCoss::testCossSearch"))
+ if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
StorePointer aRoot (new StoreController);
commonInit();
- char *path=xstrdup("testCoss::testCossSearch");
+ char *path=xstrdup(TESTDIR);
char *config_line=xstrdup("foo 100 max-size=102400 block-size=512 IOEngine=Blocking");
struct stat sb;
- CPPUNIT_ASSERT(::stat("testCoss::testCossSearch", &sb) == 0);
+ CPPUNIT_ASSERT(::stat(TESTDIR, &sb) == 0);
/* TODO: check the size */
// safe_free(Config.replPolicy->type);
// delete Config.replPolicy;
- if (0 > system ("rm -rf testCoss::testCossSearch"))
+ if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
}
* check the entries we find are what we want
*/
- if (0 > system ("rm -rf testCoss::testCossSearch"))
+ if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
StorePointer aRoot (new StoreController);
commonInit();
- char *path=xstrdup("testCoss::testCossSearch");
+ char *path=xstrdup(TESTDIR);
char *config_line=xstrdup("foo 100 max-size=102400 block-size=512 IOEngine=Blocking");
//TODO: do this once, or each time. safe_free(Config.replPolicy->type);
// delete Config.replPolicy;
- if (0 > system ("rm -rf testCoss::testCossSearch"))
+ if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
}
#include "HttpReply.h"
#include "StoreFileSystem.h"
+#define TESTDIR "testNull__testNullSearch"
+
CPPUNIT_TEST_SUITE_REGISTRATION( testNull );
typedef RefCount<NullSwapDir> SwapDirPointer;
commonInit();
- char *path=xstrdup("testNull::testNullSearch");
+ char *path=xstrdup(TESTDIR);
char *config_line=xstrdup("foo");
strtok(config_line, w_space);
aStore->parse(0, path);
commonInit();
- char *path=xstrdup("testNull::testNullSearch");
+ char *path=xstrdup(TESTDIR);
char *config_line=xstrdup("foo");
strtok(config_line, w_space);
aStore->parse(0, path);
#include "HttpHeader.h"
#include "HttpReply.h"
+#define TESTDIR "testUfs__testUfsSearch"
+
CPPUNIT_TEST_SUITE_REGISTRATION( testUfs );
typedef RefCount<UFSSwapDir> SwapDirPointer;
* check the entries we find are what we want
*/
- if (0 > system ("rm -rf testUfs::testUfsSearch"))
+ if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
StorePointer aRoot (new StoreController);
mem_policy = createRemovalPolicy(Config.replPolicy);
- char *path=xstrdup("testUfs::testUfsSearch");
+ char *path=xstrdup(TESTDIR);
char *config_line=xstrdup("foo 100 1 1");
safe_free(Config.replPolicy->type);
delete Config.replPolicy;
- if (0 > system ("rm -rf testUfs::testUfsSearch"))
+ if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
}