Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

end-to-end testing shell scripts #270

Merged
merged 22 commits into from
Jun 25, 2024
Merged

end-to-end testing shell scripts #270

merged 22 commits into from
Jun 25, 2024

Conversation

hannesm
Copy link
Contributor

@hannesm hannesm commented Jun 24, 2024

No description provided.

@robur-team robur-team force-pushed the e2e-testing branch 3 times, most recently from 539b273 to 838179e Compare June 24, 2024 13:25
robur-team and others added 20 commits June 24, 2024 21:23
In static client configuration, the "ifconfig A B" is
IP address of client followed by the IP address of the server

In other configurations, B is a netmask.

Co-Authored-By: Reynir Björnsson <[email protected]>
Co-Authored-By: Hannes Mehnert <[email protected]>
Move ip_config back to State to avoid circular dependency

Co-Authored-By: Reynir Björnsson <[email protected]>
Co-Authored-By: Hannes Mehnert <[email protected]>
This mode establishes a tunnel and sends a single ping,
waits for a reply, and exits

Co-Authored-By: Reynir Björnsson <[email protected]>
Co-Authored-By: Hannes Mehnert <[email protected]>
The test script sets up a openvpn server with varying configuration
and runs miragevpn-client-notun --test against the server.

Co-Authored-By: Reynir Björnsson <[email protected]>
Co-Authored-By: Hannes Mehnert <[email protected]>
Upon receiving an echo request the server sends back a HALT control
message to the client and then exits with exit code 0. The HALT control
message is sent back in order to tell the client to exit and not try to
reconnect.
On VPN establish we send an echo request immediately instead of waiting
one second.
* Use rm -f for the pidfile in case OpenVPN removes it first
* Use --verb 4 instead of --verb 5 in static/server.conf as otherwise
  OpenVPN will print rwWwrrRrW to stderr as read/write feedback.
send HALT to client and exit after replying to the ping

Co-Authored-By: Reynir Björnsson <[email protected]>
Co-Authored-By: Hannes Mehnert <[email protected]>
Co-Authored-By: Reynir Björnsson <[email protected]>
Co-Authored-By: Hannes Mehnert <[email protected]>
- turn coverage off at pretty printers
- execute e2e tests with verbose (to cover logs)

Co-Authored-By: Reynir Björnsson <[email protected]>
Co-Authored-By: Hannes Mehnert <[email protected]>
@robur-team robur-team force-pushed the e2e-testing branch 5 times, most recently from a9b7dff to 7617068 Compare June 25, 2024 09:13
@hannesm hannesm force-pushed the e2e-testing branch 2 times, most recently from aa578a1 to 2f5d285 Compare June 25, 2024 09:23
@hannesm
Copy link
Contributor Author

hannesm commented Jun 25, 2024

The last commit re-adds AES-GCM to tls-crypt in data-ciphers, since the GitHub runner is ubuntu 22.04 with openvpn 2.5.9 which doesn't support poly1305-chacha20. I tried to use ubuntu 24.04, but that failed to install darcs (which somehow opam requires in the setup-ocaml CI action).

Anyways, coverage around 72%.

Copy link

  0.00 %      0/21     src/cc_message.ml
 79.63 %   1470/1846   src/config.ml
 57.64 %    117/203    src/config_ext.ml
 94.74 %     18/19     src/cstruct_ext.ml
 61.01 %    801/1313   src/engine.ml
100.00 %      0/0      src/miragevpn.ml
 92.88 %    365/393    src/packet.ml
 20.00 %      1/5      src/result.ml
 62.20 %     51/82     src/state.ml
 61.48 %    150/244    src/tls_crypt.ml
 72.06 %   2973/4126   Project coverage

@reynir
Copy link
Contributor

reynir commented Jun 25, 2024

I think this is very nice now!

@reynir reynir merged commit 79a1fab into main Jun 25, 2024
5 checks passed
@reynir reynir deleted the e2e-testing branch June 25, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants