1) PATCH statement tests
PATCH /entities/items/{item_id}/statements/{statement_id}
200 success response
allows content-type application/json-patch+json:
AssertionError:
7Response body: {
errorKey: 'rest-unsupported-content-type',
messageTranslations: { en: 'Unsupported Content-Type: application/json-patch+json' },
httpCode: 415,
httpReason: 'Unsupported Media Type'
}8
Invalid status: expected 415 to equal 200
actual expected
415200
at module.exports.expect.expect (tests/mocha/helpers/chaiHelper.js:26:27)
at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
at assertValid200Response (tests/mocha/api-testing/PatchItemStatementTest.js:71:32)
at Context.<anonymous> (tests/mocha/api-testing/PatchItemStatementTest.js:123:6)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2) PATCH statement tests
PATCH /statements/{statement_id}
200 success response
allows content-type application/json-patch+json:
AssertionError:
7Response body: {
errorKey: 'rest-unsupported-content-type',
messageTranslations: { en: 'Unsupported Content-Type: application/json-patch+json' },
httpCode: 415,
httpReason: 'Unsupported Media Type'
}8
Invalid status: expected 415 to equal 200
actual expected
415200
at module.exports.expect.expect (tests/mocha/helpers/chaiHelper.js:26:27)
at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
at assertValid200Response (tests/mocha/api-testing/PatchItemStatementTest.js:71:32)
at Context.<anonymous> (tests/mocha/api-testing/PatchItemStatementTest.js:123:6)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
3) PATCH property statement
PATCH /statements/{statement_id}
200 success response
allows content-type application/json-patch+json:
AssertionError:
7Response body: {
errorKey: 'rest-unsupported-content-type',
messageTranslations: { en: 'Unsupported Content-Type: application/json-patch+json' },
httpCode: 415,
httpReason: 'Unsupported Media Type'
}8
Invalid status: expected 415 to equal 200
actual expected
415200
at module.exports.expect.expect (tests/mocha/helpers/chaiHelper.js:26:27)
at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
at assertValid200Response (tests/mocha/api-testing/PatchPropertyStatementTest.js:68:32)
at Context.<anonymous> (tests/mocha/api-testing/PatchPropertyStatementTest.js:120:6)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
4) PATCH property statement
PATCH /entities/properties/{property_id}/statements/{statement_id}
200 success response
allows content-type application/json-patch+json:
AssertionError:
7Response body: {
errorKey: 'rest-unsupported-content-type',
messageTranslations: { en: 'Unsupported Content-Type: application/json-patch+json' },
httpCode: 415,
httpReason: 'Unsupported Media Type'
}8
Invalid status: expected 415 to equal 200
actual expected
415200
at module.exports.expect.expect (tests/mocha/helpers/chaiHelper.js:26:27)
at Proxy.chainableMethodWrapper (node_modules/chai/lib/chai/utils/addChainableMethod.js:113:49)
at assertValid200Response (tests/mocha/api-testing/PatchPropertyStatementTest.js:68:32)
at Context.<anonymous> (tests/mocha/api-testing/PatchPropertyStatementTest.js:120:6)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)According to @Jakob_WMDE, this broke with the core change Rest router should provide parsed body data to handler (T358557), though it’s not yet clear why.
EventBus tests were also broken, see https://gerrit.wikimedia.org/r/c/mediawiki/extensions/EventBus/+/1008562