test: rate limit is now in nginx
This commit is contained in:
@@ -215,31 +215,6 @@ describe('Server', function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe('rate limit', function () {
|
||||
before(function (done) {
|
||||
server.start(done);
|
||||
});
|
||||
|
||||
after(function (done) {
|
||||
server.stop(done);
|
||||
nock.cleanAll();
|
||||
});
|
||||
|
||||
it('gets throttled after 200 requests', function (done) {
|
||||
async.times(200, function (n, next) {
|
||||
superagent.get(SERVER_URL + '/api/v1/cloudron/status', function (error, result) {
|
||||
expect(result.statusCode).to.equal(200);
|
||||
next();
|
||||
});
|
||||
}, function () {
|
||||
superagent.get(SERVER_URL + '/api/v1/cloudron/status', function (error, result) {
|
||||
expect(result.statusCode).to.equal(429);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('cors', function () {
|
||||
before(function (done) {
|
||||
server.start(function (error) {
|
||||
|
||||
Reference in New Issue
Block a user