-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PR: Ping to Wake Heroku Dyno #39
Conversation
Well this is lame ... On localhost I'm seeing: 20:44:20.728 [info] Already up
...........................
1) test GET /ping (GIF) renders 1x1 pixel (AppWeb.PingControllerTest)
test/app_web/controllers/ping_controller_test.exs:5
** (CaseClauseError) no case clause matching: "ping"
code: conn = get(conn, "/ping")
stacktrace:
(app 1.5.3) lib/app_web/views/item_view.ex:29: AppWeb.ItemView.filter/2
(app 1.5.3) lib/app_web/templates/item/index.html.eex:17: AppWeb.ItemView."index.html"/1
(phoenix 1.5.3) lib/phoenix/view.ex:310: Phoenix.View.render_within/3
(phoenix 1.5.3) lib/phoenix/view.ex:472: Phoenix.View.render_to_iodata/3
(phoenix 1.5.3) lib/phoenix/controller.ex:776: Phoenix.Controller.render_and_send/4
(app 1.5.3) lib/app_web/controllers/item_controller.ex:1: AppWeb.ItemController.action/2
(app 1.5.3) lib/app_web/controllers/item_controller.ex:1: AppWeb.ItemController.phoenix_controller_pipeline/2
(phoenix 1.5.3) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2
(app 1.5.3) lib/app_web/endpoint.ex:1: AppWeb.Endpoint.plug_builder_call/2
(app 1.5.3) lib/app_web/endpoint.ex:1: AppWeb.Endpoint.call/2
(phoenix 1.5.3) lib/phoenix/test/conn_test.ex:225: Phoenix.ConnTest.dispatch/5
test/app_web/controllers/ping_controller_test.exs:6: (test)
Finished in 0.5 seconds
28 tests, 1 failure
Randomized with seed 894831 When I run
After running
This is consistent with the error on Travis-CI: So it seems we can't rely on the fact that |
This is working on: https://phoenix-content-negotiation.herokuapp.com/ping |
Ok, I really don't understand this. It works on the other PR: dwyl/phoenix-content-negotiation-tutorial#5 which has virtually identical code. |
Figured it out! phoenix-todo-list-tutorial/lib/app_web/router.ex Lines 23 to 26 in ab4a45b
Moving the phoenix-todo-list-tutorial/lib/app_web/router.ex Lines 15 to 23 in d4ed703
Appears to work now. 👍 |
Codecov Report
@@ Coverage Diff @@
## master #39 +/- ##
===========================================
+ Coverage 91.83% 100.00% +8.16%
===========================================
Files 5 6 +1
Lines 49 50 +1
===========================================
+ Hits 45 50 +5
+ Misses 4 0 -4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏓
Similar to dwyl/phoenix-content-negotiation-tutorial#5
This does not add any functionality, it's just to wake the Heroku Dyno
so the UX is better for the person reading the tutorial.
Review/merge after #35 👍