diff --git a/test/filesystem/CryFsTest.cpp b/test/filesystem/CryFsTest.cpp index 8f2e66dd..8d69e6c8 100644 --- a/test/filesystem/CryFsTest.cpp +++ b/test/filesystem/CryFsTest.cpp @@ -23,6 +23,7 @@ using cpputils::unique_ref; using cpputils::Console; using cpputils::Random; using cpputils::SCrypt; +using cpputils::Data; using blockstore::ondisk::OnDiskBlockStore; using boost::none; @@ -54,3 +55,15 @@ TEST_F(CryFsTest, CreatedRootdirIsLoadableAfterClosing) { auto root = dev.Load(bf::path("/")); dynamic_pointer_move(root.get()).get()->children(); } + +TEST_F(CryFsTest, LoadingFilesystemDoesntModifyConfigFile) { + { + CryDevice dev(loadOrCreateConfig(), blockStore()); + } + Data configAfterCreating = Data::LoadFromFile(config.path()).value(); + { + CryDevice dev(loadOrCreateConfig(), blockStore()); + } + Data configAfterLoading = Data::LoadFromFile(config.path()).value(); + EXPECT_EQ(configAfterCreating, configAfterLoading); +}