sideshow / apns2

⚡ HTTP/2 Apple Push Notification Service (APNs) push provider for Go — Send push notifications to iOS, tvOS, Safari and OSX apps, using the APNs HTTP/2 protocol.
MIT License
3.01k stars 335 forks source link

Support for testing with a mock apn server #10

Closed pleasefixthisissue closed 8 years ago

pleasefixthisissue commented 8 years ago

It would be great to support testing with a mock apn server that does not use ssl.

sideshow commented 8 years ago

Sure! We do mock the APNs server/responses in the tests. Take a look at the client_tests.go where you can see an example https://github.com/sideshow/apns2/blob/master/client_test.go#L163-L168 . It uses httptest which bypasses ssl.