Merge branch 'train-119' into train-120
This commit is contained in:
Коммит
c3f01260c0
|
@ -19,6 +19,14 @@
|
|||
* **tests:** switch from insist to chai for assertions (#2608) r=@vladikoff ([1b47186](https://github.com/mozilla/fxa-auth-server/commit/1b47186)), closes [#2608](https://github.com/mozilla/fxa-auth-server/issues/2608)
|
||||
|
||||
|
||||
<a name="1.119.4"></a>
|
||||
## [1.119.4](https://github.com/mozilla/fxa-auth-server/compare/v1.119.3...v1.119.4) (2018-09-06)
|
||||
|
||||
* **push:** support port numbers in push urls ([8a9859f](https://github.com/mozilla/fxa-auth-server/commit/8a9859f))
|
||||
* **tests:** add port test ([f258387](https://github.com/mozilla/fxa-auth-server/commit/f258387))
|
||||
* **tests:** adjust geodb city for now ([fd751b2](https://github.com/mozilla/fxa-auth-server/commit/fd751b2))
|
||||
|
||||
|
||||
|
||||
<a name="1.119.3"></a>
|
||||
## [1.119.3](https://github.com/mozilla/fxa-auth-server/compare/v1.119.1...v1.119.3) (2018-08-23)
|
||||
|
|
|
@ -753,7 +753,7 @@ var conf = convict({
|
|||
allowedServerRegex: {
|
||||
doc: 'RegExp that validates the URI format of the Push Server',
|
||||
format: RegExp,
|
||||
default: /^https:\/\/[a-zA-Z0-9._-]+(\.services\.mozilla\.com|autopush\.dev\.mozaws\.net|autopush\.stage\.mozaws\.net)(\/.*)?$/
|
||||
default: /^https:\/\/[a-zA-Z0-9._-]+(\.services\.mozilla\.com|autopush\.dev\.mozaws\.net|autopush\.stage\.mozaws\.net)(?:\:\d+)?(\/.*)?$/
|
||||
}
|
||||
},
|
||||
pushbox: {
|
||||
|
|
|
@ -27,8 +27,8 @@ describe('geodb', () => {
|
|||
const thisMockLog = mockLog({})
|
||||
|
||||
const getGeoData = proxyquire(modulePath, moduleMocks)(thisMockLog)
|
||||
const geoData = getGeoData('63.245.221.32') // MTV
|
||||
assert.equal(geoData.location.city, 'Mountain View')
|
||||
const geoData = getGeoData('63.245.221.32') // Oakland
|
||||
assert.equal(geoData.location.city, 'Oakland')
|
||||
assert.equal(geoData.location.country, 'United States')
|
||||
assert.equal(geoData.location.countryCode, 'US')
|
||||
assert.equal(geoData.timeZone, 'America/Los_Angeles')
|
||||
|
|
|
@ -192,7 +192,7 @@ describe('lib/server', () => {
|
|||
it('parsed location correctly', () => {
|
||||
const geo = request.app.geo
|
||||
assert.ok(geo)
|
||||
assert.equal(geo.location.city, 'Mountain View')
|
||||
assert.equal(geo.location.city, 'Oakland')
|
||||
assert.equal(geo.location.country, 'United States')
|
||||
assert.equal(geo.location.countryCode, 'US')
|
||||
assert.equal(geo.location.state, 'California')
|
||||
|
@ -269,7 +269,7 @@ describe('lib/server', () => {
|
|||
it('second request has its own location info', () => {
|
||||
const geo = secondRequest.app.geo
|
||||
assert.notEqual(request.app.geo, secondRequest.app.geo)
|
||||
assert.equal(geo.location.city, 'Mountain View')
|
||||
assert.equal(geo.location.city, 'Oakland')
|
||||
assert.equal(geo.location.country, 'United States')
|
||||
assert.equal(geo.location.countryCode, 'US')
|
||||
assert.equal(geo.location.state, 'California')
|
||||
|
|
|
@ -375,6 +375,44 @@ describe('remote device', function () {
|
|||
}
|
||||
)
|
||||
|
||||
it(
|
||||
'update device works with callback urls that have ports',
|
||||
() => {
|
||||
var goodPushCallback = 'https://updates.push.services.mozilla.com:433'
|
||||
var email = server.uniqueEmail()
|
||||
var password = 'test password'
|
||||
return Client.create(config.publicUrl, email, password)
|
||||
.then(
|
||||
function (client) {
|
||||
var deviceInfo = {
|
||||
name: 'test device',
|
||||
type: 'mobile',
|
||||
pushCallback: goodPushCallback,
|
||||
pushPublicKey: '',
|
||||
pushAuthKey: ''
|
||||
}
|
||||
return client.devices()
|
||||
.then(
|
||||
function (devices) {
|
||||
assert.equal(devices.length, 0, 'devices returned no items')
|
||||
return client.updateDevice(deviceInfo)
|
||||
}
|
||||
)
|
||||
.then(
|
||||
function (device) {
|
||||
assert.ok(device.id, 'device.id was set')
|
||||
assert.equal(device.pushCallback, deviceInfo.pushCallback, 'device.pushCallback is correct')
|
||||
}
|
||||
)
|
||||
.catch(
|
||||
function (err) {
|
||||
assert.fail(err, 'request should have worked')
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
)
|
||||
|
||||
it(
|
||||
'update device fails with bad dev callbackUrl',
|
||||
() => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче