Skip to content

Commit

Permalink
Pull in unsupported ops snapshot spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dariakp committed Jul 9, 2021
1 parent 0c05f8a commit 2d6c3d4
Show file tree
Hide file tree
Showing 3 changed files with 768 additions and 8 deletions.
25 changes: 17 additions & 8 deletions test/functional/sessions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,23 @@ describe('Sessions - functional', function () {
expect(sessionTests).to.be.an('object');
context(String(sessionTests.description), function () {
// TODO: NODE-3393 fix test runner to apply session to all operations
const testsToSkip =
sessionTests.description === 'snapshot-sessions'
? [
'countDocuments operation with snapshot',
'Distinct operation with snapshot',
'Mixed operation with snapshot'
]
: ['Server returns an error on distinct with snapshot'];
const skipTestMap = {
'snapshot-sessions': [
'countDocuments operation with snapshot',
'Distinct operation with snapshot',
'Mixed operation with snapshot'
],
'snapshot-sessions-not-supported-server-error': [
'Server returns an error on distinct with snapshot'
],
'snapshot-sessions-unsupported-ops': [
'Server returns an error on listCollections with snapshot',
'Server returns an error on listDatabases with snapshot',
'Server returns an error on listIndexes with snapshot',
'Server returns an error on runCommand with snapshot'
]
};
const testsToSkip = skipTestMap[sessionTests.description] || [];
for (const test of sessionTests.tests) {
it(String(test.description), {
metadata: { sessions: { skipLeakTests: true } },
Expand Down
Loading

0 comments on commit 2d6c3d4

Please sign in to comment.