]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rocksdb/db/db_encryption_test.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rocksdb / db / db_encryption_test.cc
index 2322d086714b94749b7a120ce99d8eba16883132..73e89d158bd4cbc9c93ca914b00ec203bcb5b740 100644 (file)
@@ -17,7 +17,7 @@ namespace ROCKSDB_NAMESPACE {
 class DBEncryptionTest : public DBTestBase {
  public:
   DBEncryptionTest()
-      : DBTestBase("/db_encryption_test", /*env_do_fsync=*/true) {}
+      : DBTestBase("db_encryption_test", /*env_do_fsync=*/true) {}
   Env* GetTargetEnv() {
     if (encrypted_env_ != nullptr) {
       return (static_cast<EnvWrapper*>(encrypted_env_))->target();
@@ -43,8 +43,8 @@ TEST_F(DBEncryptionTest, CheckEncrypted) {
 
   Env* target = GetTargetEnv();
   int hits = 0;
-  for (auto it = fileNames.begin() ; it != fileNames.end(); ++it) {
-    if ((*it == "..") || (*it == ".") || (*it == "LOCK")) {
+  for (auto it = fileNames.begin(); it != fileNames.end(); ++it) {
+    if (*it == "LOCK") {
       continue;
     }
     auto filePath = dbname_ + "/" + *it;
@@ -64,24 +64,24 @@ TEST_F(DBEncryptionTest, CheckEncrypted) {
     ASSERT_OK(status);
 
     if (data.ToString().find("foo567") != std::string::npos) {
-      hits++; 
-      //std::cout << "Hit in " << filePath << "\n";
+      hits++;
+      // std::cout << "Hit in " << filePath << "\n";
     }
     if (data.ToString().find("v1.fetdq") != std::string::npos) {
-      hits++; 
-      //std::cout << "Hit in " << filePath << "\n";
+      hits++;
+      // std::cout << "Hit in " << filePath << "\n";
     }
     if (data.ToString().find("bar123") != std::string::npos) {
-      hits++; 
-      //std::cout << "Hit in " << filePath << "\n";
+      hits++;
+      // std::cout << "Hit in " << filePath << "\n";
     }
     if (data.ToString().find("v2.dfgkjdfghsd") != std::string::npos) {
-      hits++; 
-      //std::cout << "Hit in " << filePath << "\n";
+      hits++;
+      // std::cout << "Hit in " << filePath << "\n";
     }
     if (data.ToString().find("dfgk") != std::string::npos) {
-      hits++; 
-      //std::cout << "Hit in " << filePath << "\n";
+      hits++;
+      // std::cout << "Hit in " << filePath << "\n";
     }
   }
   if (encrypted_env_) {
@@ -119,7 +119,7 @@ TEST_F(DBEncryptionTest, ReadEmptyFile) {
   ASSERT_TRUE(data.empty());
 }
 
-#endif // ROCKSDB_LITE
+#endif  // ROCKSDB_LITE
 
 }  // namespace ROCKSDB_NAMESPACE