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