sasa1977 / site_encrypt

Integrated certification via Let's encrypt for Elixir-powered sites
MIT License
471 stars 34 forks source link

Phoenix 1.7 test failure #47

Closed damonvjanis closed 1 year ago

damonvjanis commented 1 year ago

Hi! I'm a big fan of the library and approach with using Elixir to configure SSL certs. Thank you so much for your work on this.

In a fresh Phoenix 1.7 app built with mix phx.new, and site_encrypt added per the README instructions, it looks like the Endpoint doesn't get started successfully when running mix test which causes any tests hitting the endpoint to fail.

Here's the specific error and stack trace:

** (RuntimeError) could not find persistent term for endpoint TestWeb.Endpoint. Make sure your endpoint is started and note you cannot access endpoint functions at compile-time
     code: conn = get(conn, ~p"/")
     stacktrace:
       (test 0.1.0) lib/phoenix/endpoint.ex:536: TestWeb.Endpoint.persistent!/0
       (test 0.1.0) lib/phoenix/endpoint.ex:571: TestWeb.Endpoint.path/1
       (phoenix 1.7.2) lib/phoenix/verified_routes.ex:514: Phoenix.VerifiedRoutes.unverified_path/4
       test/test_web/controllers/page_controller_test.exs:5: (test)

I've poked around a bit but haven't found the root of it yet. Unless you get to it first, I'm hoping to dig around and figure it out and submit a PR.

sasa1977 commented 1 year ago

Closing this in favor of #48 which is the same issue but has more details