/*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
#include "RequestFlags.h"
#include "SquidConfig.h"
#include "Store.h"
+#include "store/Disk.h"
+#include "store/Disks.h"
#include "StoreFileSystem.h"
#include "StoreSearch.h"
-#include "SwapDir.h"
#include "testRock.h"
#include "testStoreSupport.h"
#include "unitTestMain.h"
if (0 > system ("rm -rf " TESTDIR))
throw std::runtime_error("Failed to clean test work directory");
+ Config.memShared.defaultTo(false);
+
// use current directory for shared segments (on path-based OSes)
Ipc::Mem::Segment::BasePath = getcwd(cwd,MAXPATHLEN);
if (Ipc::Mem::Segment::BasePath == NULL)
Ipc::Mem::Segment::BasePath = ".";
- Store::Root(new StoreController);
+ Store::Init();
store = new Rock::SwapDir();
{
CPPUNIT_NS::TestFixture::tearDown();
- Store::Root(NULL);
+ Store::FreeMemory();
store = NULL;
StoreEntry *const pe = createEntry(i);
pe->buffer();
- /* TODO: remove this when the metadata is separated */
- {
- Packer p;
- packerToStoreInit(&p, pe);
- pe->getReply()->packHeadersInto(&p);
- packerClean(&p);
- }
-
+ pe->getReply()->packHeadersInto(pe);
pe->flush();
pe->timestampsSet();
pe->complete();