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

ROX-26711: Collector mock server should handle external ips #1901

Conversation

JoukoVirtanen
Copy link
Contributor

@JoukoVirtanen JoukoVirtanen commented Oct 21, 2024

Description

This makes it so that the mock server for collector integration tests can handle external IP addresses and CIDR blocks. Currently the mock server can only handle the AddressData field of the NetworkAddress struct. However, for external IP addressed and CIDR blocks the IpNetwork field is used. This change is needed for testing runtime configuration and the external IPs feature. See #1899

The function modified here is used to convert objects of type NetworkConnection to NetworkInfo. In the future NetworkInfo will not be used and NetworkConnection will be used directly. The same will be done for all of the types in integration-tests/pkg/types. See https://issues.redhat.com/browse/ROX-26716

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

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

Testing Performed

The code change here was tested by using it in integration tests here #1899

@JoukoVirtanen JoukoVirtanen marked this pull request as ready for review October 22, 2024 02:24
@JoukoVirtanen JoukoVirtanen requested a review from a team as a code owner October 22, 2024 02:24
@JoukoVirtanen JoukoVirtanen changed the title Jv rox 26711 collector mock server should handle external ips ROX-26711: Collector mock server should handle external ips Oct 22, 2024
integration-tests/pkg/mock_sensor/server.go Outdated Show resolved Hide resolved
integration-tests/pkg/mock_sensor/server.go Outdated Show resolved Hide resolved
integration-tests/pkg/mock_sensor/server.go Outdated Show resolved Hide resolved
Co-authored-by: Mauro Ezequiel Moltrasio <[email protected]>
@JoukoVirtanen JoukoVirtanen merged commit 99d0837 into master Oct 30, 2024
51 of 53 checks passed
@JoukoVirtanen JoukoVirtanen deleted the jv-ROX-26711-collector-mock-server-should-handle-external-ips branch October 30, 2024 17:10
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.

2 participants