stigsfoot / glassfit

Google Glass Fitness App
2 stars 0 forks source link

testing subscriptions/notifications #7

Open rgrinberg opened 11 years ago

rgrinberg commented 11 years ago

Google hasn't really thought through how notifications/subscriptions can be tested in the local environment. Looks like we have to resort to ugly workarounds like:

http://stackoverflow.com/questions/16907280/how-to-test-mirror-api-subscriptions

That said, I did get subscriptions calls to be successful but it seems like clicking in the glass playground will generate a notification that I will have to manually curl into local dev server every time.

rgrinberg commented 11 years ago

I wasn't completely clear last night:

Google's subscription proxy allows you to get around the SSL restriction but you have to input some callback url for yourself. But locally, the only way you can refer to yourself is using a local ip (localhost or 127.0.0.1) so Google cannot actually post back the IP to your development server.

So we have 2 options: 1) deploy every little change (so that we have a static location like glassfit.appengine.com which would work) 2) have a development server that records these subscriptions and replay them manually on the dev server. I'm looking into this since this seems to be the better way to develop this.