Pass proper param to check content-type and status
This commit is contained in:
parent
64f19b65ec
commit
664db4b5cf
@ -136,7 +136,6 @@ describe('user render timeout limit', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
it('layergroup creation works but tile request fails due to render timeout', function (done) {
|
it('layergroup creation works but tile request fails due to render timeout', function (done) {
|
||||||
this.testClient.getTile(0, 0, 0, {}, (err, res, tile) => {
|
this.testClient.getTile(0, 0, 0, {}, (err, res, tile) => {
|
||||||
assert.ifError(err);
|
assert.ifError(err);
|
||||||
@ -172,10 +171,14 @@ describe('user render timeout limit', function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('layergroup creation works even if render tile is slow', function (done) {
|
it('layergroup creation works and render tile fails', function (done) {
|
||||||
var params = {
|
var params = {
|
||||||
|
response: {
|
||||||
status: 400,
|
status: 400,
|
||||||
contentType: 'application/json; charset=utf-8'
|
headers: {
|
||||||
|
'Content-Type': 'application/json; charset=utf-8'
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.testClient.getTile(0, 0, 0, params, (err, res, tile) => {
|
this.testClient.getTile(0, 0, 0, params, (err, res, tile) => {
|
||||||
@ -207,7 +210,12 @@ describe('user render timeout limit', function () {
|
|||||||
it('layergroup creation works but vector tile request fails due to render timeout', function (done) {
|
it('layergroup creation works but vector tile request fails due to render timeout', function (done) {
|
||||||
const params = {
|
const params = {
|
||||||
format: 'mvt',
|
format: 'mvt',
|
||||||
status: 400
|
response: {
|
||||||
|
status: 400,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json; charset=utf-8'
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.testClient.getTile(0, 0, 0, params, (err, res, tile) => {
|
this.testClient.getTile(0, 0, 0, params, (err, res, tile) => {
|
||||||
@ -243,7 +251,12 @@ describe('user render timeout limit', function () {
|
|||||||
const params = {
|
const params = {
|
||||||
layers: 'mapnik',
|
layers: 'mapnik',
|
||||||
format: 'grid.json',
|
format: 'grid.json',
|
||||||
status: 400
|
response: {
|
||||||
|
status: 400,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-protobuf'
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.testClient.getTile(0, 0, 0, params, (err, res, tile) => {
|
this.testClient.getTile(0, 0, 0, params, (err, res, tile) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user