Skip to content

ROX-29399: integration tests for external IPs direction config #2140

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Stringy
Copy link
Collaborator

@Stringy Stringy commented May 27, 2025

Description

This adds integration tests for the network direction filtering of external IPs. It uses a prepared tap device to mimick egress and ingress connections, providing the tests (and collector) with both ends of the connection to ensure that aggregation happens in the correct places, with the correct configuration.

Also includes minor adjustments to test code to improve runtime configuration testing in the future.

I've chosen to add netcat to the berserker image rather than adding a new image or modifying a different one. It is likely that we will want to use berserker's network workload in the future, and that will require the same tap device, so the prepare-tap.sh script has been added, and netcat is used here for simplicity.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added integration tests

If any of these don't apply, please comment below.

Testing Performed

Tests test the tests.

@codecov-commenter
Copy link

codecov-commenter commented May 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 28.83%. Comparing base (0fc1c87) to head (f9bad77).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2140   +/-   ##
=======================================
  Coverage   28.83%   28.83%           
=======================================
  Files          96       96           
  Lines        5799     5799           
  Branches     2551     2551           
=======================================
  Hits         1672     1672           
  Misses       3408     3408           
  Partials      719      719           
Flag Coverage Δ
collector-unit-tests 28.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Stringy Stringy changed the base branch from master to ovalenti/ROX-29399-directional-extIPs May 28, 2025 13:47
@Stringy Stringy force-pushed the giles/ROX-29399-directional-extips-tests branch from 9141a82 to 7f23578 Compare May 28, 2025 13:48
@Stringy Stringy marked this pull request as ready for review May 28, 2025 13:48
@Stringy Stringy requested a review from a team as a code owner May 28, 2025 13:48
@ovalenti
Copy link
Contributor

As I understand it, both the containers are in the host network namespace, and thus they both have the tun device. The two netcat instances can bind to the external IP or use their POD's IP depending on the direction we want to simulate. And this all works because the routing table has all the IPs and knows how to route locally. Is this correct ?

If this is the case, then we may have to use the -s netcat parameter on the client to make sure that the client "comes" from the expected address.

Base automatically changed from ovalenti/ROX-29399-directional-extIPs to master May 28, 2025 16:54
@Stringy Stringy force-pushed the giles/ROX-29399-directional-extips-tests branch from f20642a to 83207ef Compare May 29, 2025 09:13
@Stringy Stringy force-pushed the giles/ROX-29399-directional-extips-tests branch from 045a275 to f9bad77 Compare June 3, 2025 13:39
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.

3 participants