Skip to content

test: round trips of every spec read function over tcp+tls - #5

Merged
boeboe merged 1 commit into
mainfrom
test/roundtrip-tls
Oct 16, 2026
Merged

boeboe merged 1 commit into
mainfrom
test/roundtrip-tls

Conversation

@boeboe

@boeboe boeboe commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Extends the record → file → replay round-trip tests to tcp+tls, now that the client takes --tls-cert, --tls-key and --tls-ca (#3).

  • TestRoundTrip_everyFunction gains two tcp+tls sources: a go-modbus tcp+tls server and an mbtest device served over TLS, both with client certificates from a throwaway CA. Every supported read function (FC01–04, 07, 08 data-returning, 11, 12, 17, 20, 24, 43/14) is recorded with client record. The file passes mbcapctl verify, and the static and replay servers answer byte for byte.
  • TestChaosRoundTrip_everyFunction also runs over tcp+tls (busy, dropped, closed, truncated and late answers): only valid answers the device sent are recorded.
  • The existing TestE2ETLS_recordAndReplay covered FC03, 08, 17, 20 and 24 only.

Test-only; no change to RELEASE.md (v3.1.0 is released). make check passes: 0 lint issues, -race tests green, coverage 96.3%.

🤖 Generated with Claude Code

TestRoundTrip_everyFunction records every supported read function from
a go-modbus tcp+tls server and an mbtest tcp+tls device with client
certificates; the capture passes mbcapctl verify and the static and
replay servers answer byte for byte. The chaos round trip also runs
over tcp+tls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@boeboe
boeboe merged commit aca18c7 into main Oct 16, 2026
7 checks passed
@boeboe
boeboe deleted the test/roundtrip-tls branch October 16, 2026 21:20
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