Skip to content

Cover monitor edge cases and handle listen failures - #4

Merged
choidanny719 merged 3 commits into
mainfrom
test/monitor-edge-cases
Oct 4, 2026
Merged

choidanny719 merged 3 commits into
mainfrom
test/monitor-edge-cases

Conversation

@choidanny719

@choidanny719 choidanny719 commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

The existing suite missed exact limits, malformed history parameters, real TLS failures, and startup errors. The new occupied-port test exposed a bug: Express passed a listen error to the callback, but the server still announced startup and ran the scheduler.

This PR adds 16 tests and handles that listen error by reporting it, closing the database, and exiting with code 1 before scheduling checks.

  • Allow 100 monitors, reject the 101st without writing data, and restore capacity after deletion.
  • Check exact 16 KiB request and 64 KiB response boundaries, including multibyte text and chunked responses.
  • Exercise configuration limits, invalid updates, history ordering, and malformed limit parameters.
  • Verify HTTPS success, pinned-address hostname verification and SNI, and rejection of untrusted, mismatched, or expired certificates.
  • Check invalid ports, occupied ports, and unusable database paths.

TLS tests use the OpenSSL CLI to generate temporary certificates and keys, then remove them. No key material is committed.

Validation: all 44 tests and the demo pass locally and in GitHub CI. The README is unchanged.

@choidanny719
choidanny719 merged commit af4d678 into main Oct 4, 2026
2 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