mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-26 08:31:22 +01:00
test: log
This commit is contained in:
committed by
Andrew Rodrigues
parent
2e9efc0e8a
commit
80ef108220
@@ -83,6 +83,7 @@ describe('Upload Controllers', () => {
|
|||||||
// why / 2? see: helpers.uploadFile for a weird quirk where we actually upload 2 files per upload in our tests.
|
// why / 2? see: helpers.uploadFile for a weird quirk where we actually upload 2 files per upload in our tests.
|
||||||
async.times(meta.config.uploadRateLimitThreshold / 2, (i, next) => {
|
async.times(meta.config.uploadRateLimitThreshold / 2, (i, next) => {
|
||||||
helpers.uploadFile(`${nconf.get('url')}/api/post/upload`, path.join(__dirname, '../test/files/503.html'), {}, jar, csrf_token, (err, res, body) => {
|
helpers.uploadFile(`${nconf.get('url')}/api/post/upload`, path.join(__dirname, '../test/files/503.html'), {}, jar, csrf_token, (err, res, body) => {
|
||||||
|
console.log(i, res.statusCode, meta.config.uploadRateLimitThreshold, Date.now());
|
||||||
if (i + 1 > meta.config.uploadRateLimitThreshold / 2) {
|
if (i + 1 > meta.config.uploadRateLimitThreshold / 2) {
|
||||||
assert.strictEqual(res.statusCode, 500);
|
assert.strictEqual(res.statusCode, 500);
|
||||||
assert.strictEqual(body.error, '[[error:upload-ratelimit-reached]]');
|
assert.strictEqual(body.error, '[[error:upload-ratelimit-reached]]');
|
||||||
|
|||||||
Reference in New Issue
Block a user