Skip to content

Add end-to-end HTTPS tests - #42

Merged
lpgauth merged 3 commits into
feature/max-requestsfrom
test/https-tests
Aug 23, 2026
Merged

Add end-to-end HTTPS tests#42
lpgauth merged 3 commits into
feature/max-requestsfrom
test/https-tests

Conversation

@lpgauth

@lpgauth lpgauth commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • The eunit fixture gains a TLS listener on 8443 next to the TCP one, sharing all request handling via a transport parameter (gen_tcp/ssl). Certs are generated at startup with public_key:pkix_test_data/1 (secp256r1/sha256 — the helper's default secp112r2/sha1 key is not negotiable by a modern TLS client), so no cert files or test deps are needed.
  • The subtests are parameterized by base URL and now also run over https on shackle_ssl, plus shackle_ssl_socket gated on OTP 28+, mirroring the existing shackle_socket gate. The client connects with verify_none since the cert is self-signed.
  • The option() type and README only admitted shackle_socket | shackle_tcp for protocol, even though https pools honor the option since bf913db; both now list all four transports.

Stacked on #41; retargets to master once that merges.

Closes #28

The eunit fixture gains a TLS listener next to the TCP one, sharing
the request handling via a transport parameter. Certs are generated
at startup with public_key:pkix_test_data/1 (secp256r1/sha256 -- the
helper's default secp112r2/sha1 key is not negotiable by a modern
TLS client), so no cert files or test deps are needed.

The subtests are parameterized by base URL and now also run over
https on shackle_ssl, plus shackle_ssl_socket gated on OTP 28+,
mirroring the shackle_socket gate. The client connects with
verify_none since the cert is self-signed.

The option() type and README only admitted shackle_socket and
shackle_tcp for protocol, even though https pools honor the option
since bf913db; both now list all four transports.

Closes #28
The eunit generators tear the fixture down and restart it back to
back. stop/0 fired exit(kill) without waiting, so the next start/0
could race the dying process for the registered name and crash
init/1 on register/2, surfacing as an opaque setup timeout on CI.
stop/0 now blocks on the DOWN signal, and init/1 reports its crash
reason to the caller instead of timing out silently.
Even with stop/0 waiting on the DOWN signal, ERTS releases the dead
fixture's ports asynchronously, so the next start/0 can still hit
eaddrinuse when it rebinds immediately. Retry the listens briefly
instead.
@lpgauth
lpgauth merged commit 5c264eb into feature/max-requests Aug 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant