Fix ported test by adding host header to the requests
This commit is contained in:
parent
adde66bc57
commit
fa1e1fd779
@ -38,6 +38,7 @@ describe('retina support', function() {
|
|||||||
url: '/database/windshaft_test/layergroup',
|
url: '/database/windshaft_test/layergroup',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
host: 'localhost',
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
data: JSON.stringify(retinaSampleMapConfig)
|
data: JSON.stringify(retinaSampleMapConfig)
|
||||||
@ -67,7 +68,10 @@ describe('retina support', function() {
|
|||||||
{
|
{
|
||||||
url: '/database/windshaft_test/layergroup/' + layergroupId + '/0/0/0' + scaleFactor + '.png',
|
url: '/database/windshaft_test/layergroup/' + layergroupId + '/0/0/0' + scaleFactor + '.png',
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
encoding: 'binary'
|
encoding: 'binary',
|
||||||
|
headers: {
|
||||||
|
host: 'localhost'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
responseHead,
|
responseHead,
|
||||||
assertFn
|
assertFn
|
||||||
|
@ -62,6 +62,7 @@ describe('server_png8_format', function() {
|
|||||||
url: '/database/windshaft_test/layergroup',
|
url: '/database/windshaft_test/layergroup',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
host: 'localhost',
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
data: JSON.stringify(layergroup)
|
data: JSON.stringify(layergroup)
|
||||||
@ -81,7 +82,10 @@ describe('server_png8_format', function() {
|
|||||||
var requestPayload = {
|
var requestPayload = {
|
||||||
url: '/database/windshaft_test/layergroup/' + layergroupId + tilePartialUrl,
|
url: '/database/windshaft_test/layergroup/' + layergroupId + tilePartialUrl,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
encoding: 'binary'
|
encoding: 'binary',
|
||||||
|
headers: {
|
||||||
|
host: 'localhost'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var requestHeaders = {
|
var requestHeaders = {
|
||||||
@ -179,4 +183,3 @@ describe('server_png8_format', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ describe('torque boundary points', function() {
|
|||||||
assert.response(server, {
|
assert.response(server, {
|
||||||
url: '/database/windshaft_test/layergroup',
|
url: '/database/windshaft_test/layergroup',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {'Content-Type': 'application/json' },
|
headers: { host: 'localhost', 'Content-Type': 'application/json' },
|
||||||
data: JSON.stringify(boundaryPointsMapConfig)
|
data: JSON.stringify(boundaryPointsMapConfig)
|
||||||
}, {}, function (res, err) {
|
}, {}, function (res, err) {
|
||||||
|
|
||||||
@ -250,7 +250,10 @@ describe('torque boundary points', function() {
|
|||||||
var partialUrl = tileRequest.z + '/' + tileRequest.x + '/' + tileRequest.y;
|
var partialUrl = tileRequest.z + '/' + tileRequest.x + '/' + tileRequest.y;
|
||||||
assert.response(server, {
|
assert.response(server, {
|
||||||
url: '/database/windshaft_test/layergroup/' + expected_token + '/0/' + partialUrl + '.json.torque',
|
url: '/database/windshaft_test/layergroup/' + expected_token + '/0/' + partialUrl + '.json.torque',
|
||||||
method: 'GET'
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
host: 'localhost'
|
||||||
|
}
|
||||||
}, {}, function (res, err) {
|
}, {}, function (res, err) {
|
||||||
assert.ok(!err, 'Failed to get json');
|
assert.ok(!err, 'Failed to get json');
|
||||||
|
|
||||||
@ -351,7 +354,7 @@ describe('torque boundary points', function() {
|
|||||||
assert.response(server, {
|
assert.response(server, {
|
||||||
url: '/database/windshaft_test/layergroup',
|
url: '/database/windshaft_test/layergroup',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {'Content-Type': 'application/json' },
|
headers: { host: 'localhost', 'Content-Type': 'application/json' },
|
||||||
data: JSON.stringify(londonPointMapConfig)
|
data: JSON.stringify(londonPointMapConfig)
|
||||||
}, {}, function (res, err) {
|
}, {}, function (res, err) {
|
||||||
assert.ok(!err, 'Failed to create layergroup');
|
assert.ok(!err, 'Failed to create layergroup');
|
||||||
@ -363,7 +366,10 @@ describe('torque boundary points', function() {
|
|||||||
|
|
||||||
assert.response(server, {
|
assert.response(server, {
|
||||||
url: '/database/windshaft_test/layergroup/' + layergroupId + '/0/2/1/1.json.torque',
|
url: '/database/windshaft_test/layergroup/' + layergroupId + '/0/2/1/1.json.torque',
|
||||||
method: 'GET'
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
host: 'localhost'
|
||||||
|
}
|
||||||
}, {}, function (res, err) {
|
}, {}, function (res, err) {
|
||||||
assert.ok(!err, 'Failed to request torque.json');
|
assert.ok(!err, 'Failed to request torque.json');
|
||||||
|
|
||||||
@ -414,7 +420,7 @@ describe('torque boundary points', function() {
|
|||||||
assert.response(server, {
|
assert.response(server, {
|
||||||
url: '/database/windshaft_test/layergroup',
|
url: '/database/windshaft_test/layergroup',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {'Content-Type': 'application/json' },
|
headers: { host: 'localhost', 'Content-Type': 'application/json' },
|
||||||
data: JSON.stringify(londonPointMapConfig)
|
data: JSON.stringify(londonPointMapConfig)
|
||||||
}, {}, function (res, err) {
|
}, {}, function (res, err) {
|
||||||
assert.ok(!err, 'Failed to create layergroup');
|
assert.ok(!err, 'Failed to create layergroup');
|
||||||
@ -426,7 +432,10 @@ describe('torque boundary points', function() {
|
|||||||
|
|
||||||
assert.response(server, {
|
assert.response(server, {
|
||||||
url: '/database/windshaft_test/layergroup/' + layergroupId + '/0/13/4255/2765.json.torque',
|
url: '/database/windshaft_test/layergroup/' + layergroupId + '/0/13/4255/2765.json.torque',
|
||||||
method: 'GET'
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
host: 'localhost'
|
||||||
|
}
|
||||||
}, {}, function (res, err) {
|
}, {}, function (res, err) {
|
||||||
assert.ok(!err, 'Failed to request torque.json');
|
assert.ok(!err, 'Failed to request torque.json');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user