Skip to content

Commit 62affb7

Browse files
authored
feat: mark CSFLE helper collections as system collections COMPASS-5624 (#42)
1 parent 6f08274 commit 62affb7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function NS(ns) {
1616
this.collection = ns.slice(this.dotIndex + 1);
1717
}
1818

19-
this.system = /^system\./.test(this.collection);
19+
this.system = /^(?:system|enxcol_)\./.test(this.collection);
2020
this.oplog = /local\.oplog\.(\$main|rs)/.test(ns);
2121

2222
this.command =

test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ describe('ns', function() {
4242
it('should acccept `a.system.foo`', function() {
4343
assert(ns('a.system.foo').special);
4444
});
45+
it('should acccept `a.enxcol_.foo`', function() {
46+
assert(ns('a.enxcol_.foo').special);
47+
});
4548
it('should not accept `a.foo`', function() {
4649
assert.equal(ns('a.foo').special, false);
4750
});

0 commit comments

Comments
 (0)