From 6ab3587709df69e5f2b2373586898a8432a9fb7e Mon Sep 17 00:00:00 2001 From: Sudip Bose Date: Fri, 21 Jun 2024 12:55:14 +0530 Subject: [PATCH] Add: Snapshot creation boilerplate --- tests/test_snapshot.cpp | 20 ++++++++++++++++++++ utils/snapshot.cc | 0 utils/snapshot.h | 20 ++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 tests/test_snapshot.cpp delete mode 100644 utils/snapshot.cc create mode 100644 utils/snapshot.h diff --git a/tests/test_snapshot.cpp b/tests/test_snapshot.cpp new file mode 100644 index 0000000..0feca1a --- /dev/null +++ b/tests/test_snapshot.cpp @@ -0,0 +1,20 @@ +#include + +#include "../utils/snapshot.h" +#include "../include/memcache.h" + + +const string snapshotFile = "backup/test_snapshot.bin"; + +TEST(TestSnapshot, SnapShotCreation){ + +} + +TEST(TestSnapshot, SnapShotLoading){ + +} + +int snapshot_creation_main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} \ No newline at end of file diff --git a/utils/snapshot.cc b/utils/snapshot.cc deleted file mode 100644 index e69de29..0000000 diff --git a/utils/snapshot.h b/utils/snapshot.h new file mode 100644 index 0000000..1079358 --- /dev/null +++ b/utils/snapshot.h @@ -0,0 +1,20 @@ +#ifndef SNAPSHOT_H +#define SNAPSHOT_H + +#include +#include + +#include "../include/memcache.h" + +template +bool create_binary_snapshot(const MemCache& memcache, const string& snapshotFile){ + +} + + +template +bool load_binary_snapshot(MemCache& memcache, const string& snapshotFile) { + +} + +#endif \ No newline at end of file