Skip to content

Commit 4c69370

Browse files
committed
test/librbd: give groups unique names in TestGroup tests
Otherwise, a failing add_snapshot test causes add_snapshotPP test to fail too, for example. Signed-off-by: Ilya Dryomov <[email protected]>
1 parent db52fca commit 4c69370

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/test/librbd/test_Groups.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ TEST_F(TestGroup, group_createPP)
4949
ASSERT_EQ(0, _rados.ioctx_create(_pool_name.c_str(), ioctx));
5050

5151
librbd::RBD rbd;
52-
ASSERT_EQ(0, rbd.group_create(ioctx, "mygroup"));
52+
ASSERT_EQ(0, rbd.group_create(ioctx, "mygroupPP"));
5353

5454
std::vector<std::string> groups;
5555
ASSERT_EQ(0, rbd.group_list(ioctx, &groups));
5656
ASSERT_EQ(1U, groups.size());
57-
ASSERT_EQ("mygroup", groups[0]);
57+
ASSERT_EQ("mygroupPP", groups[0]);
5858

5959
groups.clear();
60-
ASSERT_EQ(0, rbd.group_rename(ioctx, "mygroup", "newgroup"));
60+
ASSERT_EQ(0, rbd.group_rename(ioctx, "mygroupPP", "newgroupPP"));
6161
ASSERT_EQ(0, rbd.group_list(ioctx, &groups));
6262
ASSERT_EQ(1U, groups.size());
63-
ASSERT_EQ("newgroup", groups[0]);
63+
ASSERT_EQ("newgroupPP", groups[0]);
6464

65-
ASSERT_EQ(0, rbd.group_remove(ioctx, "newgroup"));
65+
ASSERT_EQ(0, rbd.group_remove(ioctx, "newgroupPP"));
6666

6767
groups.clear();
6868
ASSERT_EQ(0, rbd.group_list(ioctx, &groups));
@@ -194,7 +194,7 @@ TEST_F(TestGroup, add_imagePP)
194194
librados::IoCtx ioctx;
195195
ASSERT_EQ(0, _rados.ioctx_create(_pool_name.c_str(), ioctx));
196196

197-
const char *group_name = "mycg";
197+
const char *group_name = "mycgPP";
198198
librbd::RBD rbd;
199199
ASSERT_EQ(0, rbd.group_create(ioctx, group_name));
200200

@@ -407,7 +407,7 @@ TEST_F(TestGroup, add_snapshotPP)
407407
librados::IoCtx ioctx;
408408
ASSERT_EQ(0, _rados.ioctx_create(_pool_name.c_str(), ioctx));
409409

410-
const char *group_name = "snap_group";
410+
const char *group_name = "snap_groupPP";
411411
const char *snap_name = "snap_snapshot";
412412

413413
librbd::RBD rbd;

0 commit comments

Comments
 (0)