@@ -16,9 +16,6 @@ class ClusterConfigTest : public TestappXattrClientTest {
1616protected:
1717 void SetUp () override {
1818 TestappXattrClientTest::SetUp ();
19- // Make sure we've specified a session token
20- setClusterSessionToken (0xdeadbeef );
21-
2219 protocol_binary_datatype_t expected = 0 ;
2320 if (hasSnappySupport () == ClientSnappySupport::Everywhere) {
2421 expected |= PROTOCOL_BINARY_DATATYPE_SNAPPY;
@@ -34,11 +31,10 @@ class ClusterConfigTest : public TestappXattrClientTest {
3431 userConnection.reset ();
3532 }
3633
37- BinprotResponse setClusterConfig (uint64_t token,
38- const std::string& config,
34+ BinprotResponse setClusterConfig (const std::string& config,
3935 int64_t revision) {
4036 return adminConnection->execute (BinprotSetClusterConfigCommand{
41- token, config, 1 , revision, bucketName});
37+ config, 1 , revision, bucketName});
4238 }
4339
4440 void test_MB_17506 (bool dedupe, bool client_setting);
@@ -85,7 +81,7 @@ void ClusterConfigTest::test_MB_17506(bool dedupe, bool client_setting) {
8581 const std::string clustermap{R"( {"rev":100})" };
8682
8783 // Make sure we have a cluster configuration installed
88- auto response = setClusterConfig (token, clustermap, 100 );
84+ auto response = setClusterConfig (clustermap, 100 );
8985 EXPECT_TRUE (response.isSuccess ());
9086
9187 BinprotGetCommand command{" foo" , Vbid{1 }};
@@ -121,24 +117,9 @@ void ClusterConfigTest::test_MB_17506(bool dedupe, bool client_setting) {
121117 }
122118}
123119
124- TEST_P (ClusterConfigTest, SetClusterConfigWithIncorrectSessionToken) {
125- auto response = setClusterConfig (0xcafebeef , R"( {"rev":100})" , 100 );
126- EXPECT_FALSE (response.isSuccess ()) << " Should not be allowed to set "
127- " cluster config with invalid session "
128- " token" ;
129- EXPECT_EQ (cb::mcbp::Status::KeyEexists, response.getStatus ());
130- }
131-
132- TEST_P (ClusterConfigTest, SetClusterConfigWithCorrectToken) {
133- auto response = setClusterConfig (token, R"( {"rev":100})" , 100 );
134- EXPECT_TRUE (response.isSuccess ()) << " Should be allowed to set cluster "
135- " config with the correct session "
136- " token" ;
137- }
138-
139120TEST_P (ClusterConfigTest, GetClusterConfig) {
140121 const std::string config{R"( {"rev":100})" };
141- ASSERT_TRUE (setClusterConfig (token, config, 100 ).isSuccess ());
122+ ASSERT_TRUE (setClusterConfig (config, 100 ).isSuccess ());
142123
143124 BinprotGenericCommand cmd{cb::mcbp::ClientOpcode::GetClusterConfig};
144125 const auto response = userConnection->execute (cmd);
@@ -155,11 +136,10 @@ TEST_P(ClusterConfigTest, GetClusterConfig_ClusterCompat) {
155136 // version cluster.
156137 int64_t epoch = -1 ;
157138 const std::string config{R"( {"rev":100})" };
158- ASSERT_TRUE (
159- adminConnection
160- ->execute (BinprotSetClusterConfigCommand{
161- token, config, epoch, 100 /* revision */ , " default" })
162- .isSuccess ());
139+ ASSERT_TRUE (adminConnection
140+ ->execute (BinprotSetClusterConfigCommand{
141+ config, epoch, 100 /* revision */ , " default" })
142+ .isSuccess ());
163143
164144 BinprotGenericCommand cmd{cb::mcbp::ClientOpcode::GetClusterConfig};
165145 const auto response = userConnection->execute (cmd);
@@ -235,16 +215,15 @@ void ClusterConfigTest::test_CccpPushNotification(bool global, bool brief) {
235215 if (global) {
236216 adminConnection->executeInBucket (bucketName, [&global_map](auto & c) {
237217 ASSERT_TRUE (c.execute (BinprotSetClusterConfigCommand{
238- token, global_map, 2 , 532 , {}})
218+ global_map, 2 , 532 , {}})
239219
240220 .isSuccess ());
241221 });
242222 } else {
243223 adminConnection->executeInBucket (bucketName, [&bucket_map](auto & c) {
244- ASSERT_TRUE (
245- c.execute (BinprotSetClusterConfigCommand{
246- token, bucket_map, 1 , 666 , bucketName})
247- .isSuccess ());
224+ ASSERT_TRUE (c.execute (BinprotSetClusterConfigCommand{
225+ bucket_map, 1 , 666 , bucketName})
226+ .isSuccess ());
248227 });
249228 }
250229
@@ -315,11 +294,11 @@ TEST_P(ClusterConfigTest, ClustermapChangeNotificationBrief_Global) {
315294
316295TEST_P (ClusterConfigTest, SetGlobalClusterConfig) {
317296 // Set one for the default bucket
318- setClusterConfig (token, R"( {"rev":1000})" , 1000 );
297+ setClusterConfig (R"( {"rev":1000})" , 1000 );
319298
320299 // Set the global config
321- auto rsp = adminConnection->execute (BinprotSetClusterConfigCommand{
322- token, R"( {"foo" : "bar"})" , 1 , 100 , " " });
300+ auto rsp = adminConnection->execute (
301+ BinprotSetClusterConfigCommand{ R"( {"foo" : "bar"})" , 1 , 100 , " " });
323302 ASSERT_TRUE (rsp.isSuccess ()) << rsp.getDataView ();
324303
325304 rsp = adminConnection->execute (
@@ -339,7 +318,7 @@ TEST_P(ClusterConfigTest, SetGlobalClusterConfig) {
339318 * The bucket configuration was not reset as part of bucket deletion
340319 */
341320TEST_P (ClusterConfigTest, MB35395) {
342- setClusterConfig (token, R"( {"rev":1000})" , 1000 );
321+ setClusterConfig (R"( {"rev":1000})" , 1000 );
343322
344323 // Recreate the bucket, and the cluster config should be gone!
345324 DeleteTestBucket ();
@@ -354,7 +333,7 @@ TEST_P(ClusterConfigTest, MB35395) {
354333}
355334
356335TEST_P (ClusterConfigTest, MB57311_RequestWithVersion) {
357- setClusterConfig (token, R"( {"rev":1000})" , 1000 );
336+ setClusterConfig (R"( {"rev":1000})" , 1000 );
358337 auto validatePushedRevno = [](int64_t epoch, int64_t revno) {
359338 nlohmann::json json;
360339 userConnection->stats (
0 commit comments