Skip to content

Commit cfb1c3a

Browse files
committed
test: add start and stop automerge tests
1 parent 1c3f5dd commit cfb1c3a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

packages/shell-api/src/shard.spec.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,6 +2518,21 @@ describe('Shard', function () {
25182518
);
25192519
});
25202520
});
2521+
describe('automerge', function () {
2522+
skipIfServerVersion(mongos, '< 7.0'); // Available from 7.0
2523+
it('stops correctly', async function () {
2524+
expect((await sh.stopAutoMerger()).acknowledged).to.equal(true);
2525+
expect(
2526+
(await sh.status()).value.automerge['Currently enabled']
2527+
).to.equal('no');
2528+
});
2529+
it('enables correctly', async function () {
2530+
expect((await sh.startAutoMerger()).acknowledged).to.equal(true);
2531+
expect(
2532+
(await sh.status()).value.automerge['Currently enabled']
2533+
).to.equal('yes');
2534+
});
2535+
});
25212536
describe('autosplit', function () {
25222537
skipIfServerVersion(mongos, '> 6.x'); // Auto-splitter is removed in 7.0
25232538
it('disables correctly', async function () {

0 commit comments

Comments
 (0)