site_encrypt v0.1.0 SiteEncrypt.Phoenix.Test View Source
Helper for testing the certification.
Usage
defmodule MyEndpoint.CertificationTest do
use SiteEncrypt.Phoenix.Test, endpoint: MyEndpoint
end
This will generate a single test which does the following:
- Stops the endpoint, and removes the db_folder and the backup.
- Restarts the endpoint, temporarily setting
server: true
. - Waits for the certification to finish.
- Verifies that the site is serving the traffic using the new certificate.
For this to work, you need to use the internal ACME server during tests.
Refer to SiteEncrypt.configure/1
for details.