]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/mds: fix Session cons call
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 1 Feb 2019 18:07:58 +0000 (10:07 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 4 Mar 2019 18:25:33 +0000 (10:25 -0800)
Problem did not exist in master.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/test/mds/TestSessionFilter.cc

index 98e2212506fd7ace0130dc104aa733ee92bf936a..d9f495fe8d082355dc9b2ac0318ad3ae274ed151 100644 (file)
@@ -74,8 +74,8 @@ TEST(MDSSessionFilter, IdEquality)
   SessionFilter filter;
   std::stringstream ss;
   filter.parse({"id=123"}, &ss);
-  Session *a = new Session();;
-  Session *b = new Session();;
+  Session *a = new Session(nullptr);;
+  Session *b = new Session(nullptr);;
   a->info.inst.name.parse("client.123");
   b->info.inst.name.parse("client.456");
 
@@ -90,9 +90,9 @@ TEST(MDSSessionFilter, StateEquality)
   SessionFilter filter;
   std::stringstream ss;
   filter.parse({"state=closing"}, &ss);
-  Session *a = new Session();
+  Session *a = new Session(nullptr);
   a->set_state(Session::STATE_CLOSING);
-  Session *b = new Session();
+  Session *b = new Session(nullptr);
   b->set_state(Session::STATE_OPENING);
 
   ASSERT_TRUE(filter.match(*a, [](client_t c) -> bool {return false;}));
@@ -106,9 +106,9 @@ TEST(MDSSessionFilter, AuthEquality)
   SessionFilter filter;
   std::stringstream ss;
   filter.parse({"auth_name=rhubarb"}, &ss);
-  Session *a = new Session();
+  Session *a = new Session(nullptr);
   a->info.auth_name.set_id("rhubarb");
-  Session *b = new Session();
+  Session *b = new Session(nullptr);
   b->info.auth_name.set_id("custard");
 
   ASSERT_TRUE(filter.match(*a, [](client_t c) -> bool {return false;}));
@@ -123,9 +123,9 @@ TEST(MDSSessionFilter, MetadataEquality)
   std::stringstream ss;
   int r = filter.parse({"client_metadata.root=/rhubarb"}, &ss);
   ASSERT_EQ(r, 0);
-  Session *a = new Session();
+  Session *a = new Session(nullptr);
   a->set_client_metadata(std::map<std::string,std::string>({{"root", "/rhubarb"}}));
-  Session *b = new Session();
+  Session *b = new Session(nullptr);
   b->set_client_metadata(std::map<std::string,std::string>({{"root", "/custard"}}));
 
   ASSERT_TRUE(filter.match(*a, [](client_t c) -> bool {return false;}));
@@ -140,7 +140,7 @@ TEST(MDSSessionFilter, ReconnectingEquality)
   std::stringstream ss;
   int r = filter.parse({"reconnecting=true"}, &ss);
   ASSERT_EQ(r, 0);
-  Session *a = new Session();
+  Session *a = new Session(nullptr);
 
   ASSERT_TRUE(filter.match(*a, [](client_t c) -> bool {return true;}));
   ASSERT_FALSE(filter.match(*a, [](client_t c) -> bool {return false;}));