Skip to content

Commit 5434962

Browse files
committed
test: allow specifying that tests require legacy topologies
1 parent c9b0152 commit 5434962

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/runner/filters/unified_filter.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ class UnifiedTopologyFilter {
1414
filter(test) {
1515
if (!test.metadata) return true;
1616
if (!test.metadata.requires) return true;
17-
if (!test.metadata.requires.unifiedTopology) return true;
17+
if (typeof test.metadata.requires.unifiedTopology !== 'boolean') return true;
1818

19-
return !!process.env.MONGODB_UNIFIED_TOPOLOGY;
19+
const requireUnifiedTopology = !!test.metadata.requires.unifiedTopology;
20+
return requireUnifiedTopology === !!process.env.MONGODB_UNIFIED_TOPOLOGY;
2021
}
2122
}
2223

0 commit comments

Comments
 (0)