From e0ff48f1713f549ce5d2293c62a1cd09453ee26c Mon Sep 17 00:00:00 2001 From: VladiMihaylenko Date: Thu, 14 Sep 2017 11:20:37 +0300 Subject: Fixed storage tests --- storage/storage_tests/storage_tests.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'storage') diff --git a/storage/storage_tests/storage_tests.cpp b/storage/storage_tests/storage_tests.cpp index bb0502ef21..645e81aa12 100644 --- a/storage/storage_tests/storage_tests.cpp +++ b/storage/storage_tests/storage_tests.cpp @@ -844,29 +844,24 @@ UNIT_CLASS_TEST(TwoComponentStorageTest, DownloadTwoCountriesAndDelete) unique_ptr uruguayChecker = make_unique( storage, uruguayCountryId, MapOptions::MapWithCarRouting, vector{Status::ENotDownloaded, Status::EDownloading, Status::ENotDownloaded}); - // Only routing file will be deleted for Venezuela, thus, Venezuela should pass through - // following - // states: - // NotDownloaded -> InQueue (Venezuela is added after Uruguay) -> Downloading -> Downloading - // (second notification will be sent after deletion of a routing file) -> OnDisk. + // Venezuela should pass through the following states: + // NotDownloaded -> InQueue (Venezuela is added after Uruguay) -> Downloading -> NotDownloaded. unique_ptr venezuelaChecker = make_unique( storage, venezuelaCountryId, MapOptions::MapWithCarRouting, vector{Status::ENotDownloaded, Status::EInQueue, Status::EDownloading, - Status::EDownloading, Status::EOnDisk}); + Status::ENotDownloaded}); uruguayChecker->StartDownload(); venezuelaChecker->StartDownload(); storage.DeleteCountry(uruguayCountryId, MapOptions::Map); - storage.DeleteCountry(venezuelaCountryId, MapOptions::CarRouting); + storage.DeleteCountry(venezuelaCountryId, MapOptions::Map); runner.Run(); } - // @TODO(bykoianko) This test changed its behaivier. This commented lines are left specially - // to fixed later. + TLocalFilePtr uruguayFile = storage.GetLatestLocalFile(uruguayCountryId); TEST(!uruguayFile.get(), (*uruguayFile)); TLocalFilePtr venezuelaFile = storage.GetLatestLocalFile(venezuelaCountryId); - TEST(venezuelaFile.get(), ()); - TEST_EQUAL(MapOptions::Map, venezuelaFile->GetFiles(), ()); + TEST(!venezuelaFile.get(), ()); } UNIT_CLASS_TEST(StorageTest, CancelDownloadingWhenAlmostDone) -- cgit v1.2.3