ooni / minivpn

A minimalistic OpenVPN implementation in Go
GNU General Public License v3.0
36 stars 6 forks source link

tests: adapt integration tests to run against the refactored code #65

Closed ainghazal closed 5 months ago

ainghazal commented 5 months ago

As part of a previous commit ($64), I reverted a recent "fix" that was inverting the local-remote session id check - the error in that commit was to change the check to match the description in the comment. In reality, it was the comment that was wrong.

This commit enables integration tests for the new internal path to avoid this kind of errors in the future.

Some test code was removed, because the script to parse certs etc was written before minivpn could parse inline credentials. not needed anymore.

For more context: the reason why we cannot check remote session id in all packets is because remote-session-id only present if the packet has an ack array. The handshake was broken by the previous change, but I did not catch it because the integration tests were not running for the refactored codebase.

ainghazal commented 5 months ago

fixed unit tests; integration test should be green after merging #64

ainghazal commented 5 months ago

@bassosimone ready for review!

ainghazal commented 5 months ago

@bassosimone so, since the commit that fixed the bug had been retained in #64 by mistake, I've edited this PR to reflect merely the changes to the integration tests. done here!