Mercurial > hg > orthanc
diff UnitTestsSources/ServerIndex.cpp @ 707:203157cb4fde
unit tests of httpclient
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 13 Feb 2014 14:37:35 +0100 |
parents | 2d829ea1db96 |
children | 8f62e8d5a384 |
line wrap: on
line diff
--- a/UnitTestsSources/ServerIndex.cpp Thu Feb 13 12:46:39 2014 +0100 +++ b/UnitTestsSources/ServerIndex.cpp Thu Feb 13 14:37:35 2014 +0100 @@ -517,9 +517,9 @@ { const std::string path = "OrthancStorageUnitTests"; Toolbox::RemoveFile(path + "/index"); - ServerContext context(path, ":memory:"); + ServerContext context(path, ":memory:"); // The SQLite DB is in memory ServerIndex& index = context.GetIndex(); - + index.SetMaximumStorageSize(10); Json::Value tmp; @@ -534,4 +534,7 @@ instance.SetValue(DICOM_TAG_SERIES_INSTANCE_UID, "series1"); instance.SetValue(DICOM_TAG_SOP_INSTANCE_UID, "instance1"); ASSERT_EQ(StoreStatus_Success, index.Store(instance, attachments, "")); + + // Because the DB is in memory, the SQLite index must not have been created + ASSERT_THROW(Toolbox::GetFileSize(path + "/index"), OrthancException); }