Skip to content

Commit 41c221b

Browse files
author
mpv1989
committed
Fix test for cluster setup
1 parent ce5322d commit 41c221b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/test/10-manipulating-collections.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,17 @@ describe("Manipulating collections", () => {
121121
.catch(done);
122122
});
123123
});
124-
describe("collection.rename", () => {
124+
describe.only("collection.rename", () => {
125125
it("should rename a collection", done => {
126-
const name = `rename-collection-${Date.now()}`;
127-
collection
128-
.rename(name)
129-
.then(info => {
130-
expect(info).to.have.property("name", name);
126+
db
127+
.route("/_admin/server/role")
128+
.get()
129+
.then(res => {
130+
if (res.body.role !== "SINGLE") return;
131+
const name = `rename-collection-${Date.now()}`;
132+
return collection.rename(name).then(info => {
133+
expect(info).to.have.property("name", name);
134+
});
131135
})
132136
.then(() => void done())
133137
.catch(done);

0 commit comments

Comments
 (0)