]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/test_rgw_token.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / test / test_rgw_token.cc
index f2defbf305158d373d3737fa68c5720a6370cf9c..6136b6043c55f2dc66d662fdff29cfe369c10cfa 100644 (file)
@@ -22,8 +22,8 @@
 #include "common/debug.h"
 #include "include/ceph_assert.h"
 #include "gtest/gtest.h"
-#include "rgw/rgw_token.h"
-#include "rgw/rgw_b64.h"
+#include "rgw_token.h"
+#include "rgw_b64.h"
 
 #define dout_subsys ceph_subsys_rgw
 
@@ -45,25 +45,25 @@ namespace {
   std::string non_base64{"stuff here"};
   std::string non_base64_sploded{"90KLscc0Dz4U49HX-7Tx"};
 
-  Formatter* formatter{nullptr};
+  Formatter* token_formatter{nullptr};
   bool verbose {false};
 }
 
 using namespace std;
 
 TEST(TOKEN, INIT) {
-  formatter = new JSONFormatter(true /* pretty */);
-  ASSERT_NE(formatter, nullptr);
+  token_formatter = new JSONFormatter(true /* pretty */);
+  ASSERT_NE(token_formatter, nullptr);
 }
 
 TEST(TOKEN, ENCODE) {
   // encode the two supported types
   RGWToken token_ad(RGWToken::TOKEN_AD, access_key, secret_key);
-  ASSERT_EQ(token_ad.encode_json_base64(formatter), enc_ad);
+  ASSERT_EQ(token_ad.encode_json_base64(token_formatter), enc_ad);
   tokens.push_back(token_ad); // provies copiable
 
   RGWToken token_ldap(RGWToken::TOKEN_LDAP, access_key, secret_key);
-  ASSERT_EQ(token_ldap.encode_json_base64(formatter), enc_ldap);
+  ASSERT_EQ(token_ldap.encode_json_base64(token_formatter), enc_ldap);
   tokens.push_back(token_ldap);
 }
 
@@ -101,7 +101,7 @@ TEST(TOKEN, BADINPUT3) {
 }
 
 TEST(TOKEN, SHUTDOWN) {
-  delete formatter;
+  delete token_formatter;
 }
 
 int main(int argc, char *argv[])