Skip to content

chore(ci): xunit integration [3.5] #2641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,20 @@ functions:
NODE_LTS_NAME=${NODE_LTS_NAME} DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
SSL_CA_FILE="${SSL_CA_FILE}" SSL_KEY_FILE="${SSL_KEY_FILE}" \
MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh
upload test results:
- command: attach.xunit_results
params:
file: src/xunit.xml
pre:
- func: fetch source
- func: prepare resources
- func: fix absolute paths
- func: make files executable
post:
- func: upload test results
- func: cleanup
ignore:
- '*.md'
tasks:
- name: test-latest-server
tags:
Expand Down
9 changes: 9 additions & 0 deletions .evergreen/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ functions:
SSL_CA_FILE="${SSL_CA_FILE}" SSL_KEY_FILE="${SSL_KEY_FILE}" \
MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh

"upload test results":
- command: attach.xunit_results
params:
file: src/xunit.xml

pre:
- func: "fetch source"
- func: "prepare resources"
Expand All @@ -248,4 +253,8 @@ pre:
- func: "make files executable"

post:
- func: "upload test results"
- func: "cleanup"

ignore:
- '*.md'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ manual_tests/
docs/build
docs/Makefile

# xunit test output for CI
xunit.xml

# Directory for dbs
db

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The official [MongoDB](https://www.mongodb.com/) driver for Node.js. Provides a
| what | where |
|---------------|------------------------------------------------|
| documentation | http://mongodb.github.io/node-mongodb-native |
| api-doc | http://mongodb.github.io/node-mongodb-native/3.1/api |
| api-doc | http://mongodb.github.io/node-mongodb-native/3.5/api |
| source | https://github.com/mongodb/node-mongodb-native |
| mongodb | http://www.mongodb.org |

Expand Down
4 changes: 4 additions & 0 deletions lib/operations/list_collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class ListCollectionsOperation extends CommandOperationV2 {
nameOnly: this.nameOnly
};

if (this.options.collation) {
delete this.options.collation;
}

return super.executeCommand(server, command, callback);
}
}
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"sinon": "^4.3.0",
"sinon-chai": "^3.2.0",
"snappy": "^6.3.4",
"spec-xunit-file": "0.0.1-3",
"standard-version": "^4.4.0",
"util.promisify": "^1.0.1",
"worker-farm": "^1.5.0",
Expand Down
2 changes: 1 addition & 1 deletion test/functional/operation_example.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ describe('Operation Examples', function() {
* @ignore
*/
it('shouldCorrectlyPerformSimpleGeoHaystackSearchCommand', {
metadata: { requires: { topology: ['single', 'replicaset'] } },
metadata: { requires: { mongodb: '<=4.4', topology: ['single', 'replicaset'] } },

// The actual test we wish to run
test: function(done) {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/operation_generators_example.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,7 @@ describe('Operation (Generators)', function() {
* @ignore
*/
it('shouldCorrectlyPerformSimpleGeoHaystackSearchCommandWithGenerators', {
metadata: { requires: { generators: true, topology: ['single'] } },
metadata: { requires: { mongodb: '<=4.4', generators: true, topology: ['single'] } },

// The actual test we wish to run
test: function() {
Expand Down
2 changes: 1 addition & 1 deletion test/functional/operation_promises_example.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ describe('Operation (Promises)', function() {
* @ignore
*/
it('shouldCorrectlyPerformSimpleGeoHaystackSearchCommandWithPromises', {
metadata: { requires: { topology: ['single', 'replicaset'] } },
metadata: { requires: { mongodb: '<=4.4', topology: ['single', 'replicaset'] } },

// The actual test we wish to run
test: function() {
Expand Down
9 changes: 6 additions & 3 deletions test/functional/readconcern.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ describe('ReadConcern', function() {
{
description: 'Should set majority readConcern geoSearch command',
commandName: 'geoSearch',
readConcern: { level: 'majority' }
readConcern: { level: 'majority' },
serverVersion: '>=3.2 <=4.4'
},
{
description: 'Should set local readConcern at collection level',
Expand All @@ -59,9 +60,11 @@ describe('ReadConcern', function() {
];

tests.forEach(test => {
const metadata = {
requires: { topology: 'replicaset', mongodb: test.serverVersion || '>= 3.2' }
};
it(test.description, {
metadata: { requires: { topology: 'replicaset', mongodb: '>= 3.2' } },

metadata,
test: function(done) {
const started = [];
const succeeded = [];
Expand Down
3 changes: 2 additions & 1 deletion test/mocha.opts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
--timeout 60000
--file test/tools/runner
--ui test/tools/runner/metadata_ui.js

--reporter spec-xunit-file
--color