jrconlin/pushgo

Server returns https endpoint when wss is expected.

Closed this issue · 1 comments

From Edwin's test suite:

Test registration without prior handshake ... ::RECV:: {"channelID":"reg_noshake_chan_1","error":"Invalid command","messageType":"register","status":401}
::RESPONSE GOT:: {u'status': 401, u'channelID': u'reg_noshake_chan_1', u'messageType': u'register', u'error': u'Invalid command'}
::RESPONSE EXPECTED:: {'status': 401, 'messageType': 'register', 'error': 'Invalid command'}
::RESPONSE GOT:: {u'status': 401, u'channelID': u'reg_noshake_chan_1', u'messageType': u'register', u'error': u'Invalid command'}
::RESPONSE EXPECTED:: {'status': 401, 'messageType': 'register', 'error': 'Invalid command'}
::RESPONSE GOT:: {u'status': 401, u'channelID': u'reg_noshake_chan_1', u'messageType': u'register', u'error': u'Invalid command'}
::RESPONSE EXPECTED:: {'status': 401, 'messageType': 'register', 'error': 'Invalid command'}
::RECV:: {"messageType":"hello","status":200,"uaid":"reg_noshake_uaid_1"}
::RECV:: {"messageType":"register","pushEndpoint":"https://push.services.mozilla.com/update/KquicqbjfaqaObD_zeYFDQj1J-ZHvFdhAuG7Fd5TgUo489u697j5OBRAeUOuP1JsE2_IWmY=","status":200}
::RESPONSE GOT:: {u'status': 200, u'pushEndpoint': u'https://push.services.mozilla.com/update/KquicqbjfaqaObD_zeYFDQj1J-ZHvFdhAuG7Fd5TgUo489u697j5OBRAeUOuP1JsE2_IWmY=', u'messageType': u'register'}
::RESPONSE EXPECTED:: {'status': 200, 'pushEndpoint': 'wss://push.services.mozilla.com:443/update/reg_noshake_uaid_1.reg_noshake_chan_1', 'messageType': 'register'}
::RESPONSE GOT:: {u'status': 200, u'pushEndpoint': u'https://push.services.mozilla.com/update/KquicqbjfaqaObD_zeYFDQj1J-ZHvFdhAuG7Fd5TgUo489u697j5OBRAeUOuP1JsE2_IWmY=', u'messageType': u'register'}
::RESPONSE EXPECTED:: {'status': 200, 'pushEndpoint': 'wss://push.services.mozilla.com:443/update/reg_noshake_uaid_1.reg_noshake_chan_1', 'messageType': 'register'}
FAIL
======================================================================
FAIL: test_reg_noshake (__main__.TestPushAPI)
Test registration without prior handshake
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_push_api.py", line 164, in test_reg_noshake
    (self.endPoint_url, 'update/reg_noshake_uaid_1.reg_noshake_chan_1')})
  File "test_push_api.py", line 94, in _check_json
    self.assertEqual(json_data[key], kv[key])
AssertionError: u'https://push.services.mozilla.com/update/KquicqbjfaqaObD_zeYFDQj1J-ZHvFdhAuG7Fd5TgUo489u697j5OBRAeUOuP1JsE2_IWmY=' != 'wss://push.services.mozilla.com:443/update/reg_noshake_uaid_1.reg_noshake_chan_1'

----------------------------------------------------------------------

from irc - the test wasn't configured to handle wss or https at that time. No repro now. Please close.