Add a test case that loading a filesystem doesn't modify the config file
This commit is contained in:
parent
d003b7f0c5
commit
923cd40acf
@ -23,6 +23,7 @@ using cpputils::unique_ref;
|
|||||||
using cpputils::Console;
|
using cpputils::Console;
|
||||||
using cpputils::Random;
|
using cpputils::Random;
|
||||||
using cpputils::SCrypt;
|
using cpputils::SCrypt;
|
||||||
|
using cpputils::Data;
|
||||||
using blockstore::ondisk::OnDiskBlockStore;
|
using blockstore::ondisk::OnDiskBlockStore;
|
||||||
using boost::none;
|
using boost::none;
|
||||||
|
|
||||||
@ -54,3 +55,15 @@ TEST_F(CryFsTest, CreatedRootdirIsLoadableAfterClosing) {
|
|||||||
auto root = dev.Load(bf::path("/"));
|
auto root = dev.Load(bf::path("/"));
|
||||||
dynamic_pointer_move<CryDir>(root.get()).get()->children();
|
dynamic_pointer_move<CryDir>(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);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user