summaryrefslogtreecommitdiff
path: root/test/storage
diff options
context:
space:
mode:
Diffstat (limited to 'test/storage')
-rwxr-xr-xtest/storage/server.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/storage/server.js b/test/storage/server.js
index 92e9e9e0e7..b54ff835ec 100755
--- a/test/storage/server.js
+++ b/test/storage/server.js
@@ -127,6 +127,37 @@ app.get('/rate-limit', function(req, res) {
res.status(429).end();
});
+var styleFailOnce500 = true;
+app.get('/style-fail-once-500', function (req, res) {
+ if (styleFailOnce500) {
+ res.status(500).send('Server Error!');
+ styleFailOnce500 = false;
+ } else {
+ res.status(200).send('{ "version": 8, "name": "Teste Style" }');
+ }
+});
+
+var styleFailOnce404 = true;
+app.get('/style-fail-once-404', function (req, res) {
+ if (styleFailOnce404) {
+ res.status(404).send('Not found!');
+ styleFailOnce404 = false;
+ } else {
+ res.status(200).send('{ "version": 8, "name": "Teste Style" }');
+ }
+});
+
+var styleFailOnce404Cache = true;
+app.get('/style-fail-once-404-cache', function (req, res) {
+ if (styleFailOnce404Cache) {
+ res.setHeader('Cache-Control', 'max-age=30');
+ res.status(404).send('Not found!');
+ styleFailOnce404Cache = false;
+ } else {
+ res.status(200).send('{ "version": 8, "name": "Teste Style" }');
+ }
+});
+
app.get('/delayed', function(req, res) {
setTimeout(function() {
res.status(200).send('Response');