Skip to content

Feature/extend tests in linux#17

Merged
KostiantynYarovyiBf merged 4 commits into
mainfrom
feature/extend_tests_in_linux
Feb 24, 2026
Merged

Feature/extend tests in linux#17
KostiantynYarovyiBf merged 4 commits into
mainfrom
feature/extend_tests_in_linux

Conversation

@KostiantynYarovyiBf

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Linux integration test suite with several new test cases and implements a critical bug fix for agent eviction when receiving HTTP 304 responses. The changes include:

Changes:

  • Extracted common integration test utilities into utils.py and conftest.py for better code organization
  • Added 4 new integration tests: ICMP ping verification, peer update propagation, 304 heartbeat handling, and TTL expiry failsafe
  • Fixed a critical bug where agents receiving 304 responses were being evicted due to stale last_seen timestamps
  • Implemented automatic re-registration when agents are evicted from the control plane
  • Added route management for peer allowed_vpn_ips on both Linux (netlink) and macOS (route command)
  • Added iptables rules in test setup to allow forwarding between test namespaces

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/integration/linux/utils.py New file consolidating common test utilities and helper functions
tests/integration/linux/test_two_peers_init.py Refactored to use shared utilities, added 4 new comprehensive integration tests
tests/integration/linux/conftest.py New file with pytest fixtures, moved integration_env fixture from test file
tests/integration/linux/fixtures/setup_env.sh Added iptables rules to allow packet forwarding between test namespaces
tests/integration/linux/fixtures/cleanup_env.sh Added cleanup for iptables rules added during setup
src/registration/rest_client.hpp Added is_registered() method, updated ping() comment, formatting improvements
src/registration/rest_client.cpp Implemented 404 handling to clear registration and is_registered() method
src/registration/registration_peers.hpp Added re_register() method declaration with documentation
src/registration/registration_peers.cpp Implemented automatic re-registration on eviction in heartbeat loop
src/platform/linux/tunnel_manager_impl.cpp Added manage_interface_route() function for netlink-based route management, integrated into peer add/remove
src/platform/macos/tunnel_manager_impl.cpp Added route command calls for peer allowed_vpn_ips in add/remove operations
control_plane_mock/mock_server.py Added touch() method and call it on 304 responses to prevent improper eviction
README.md Reorganized debug instructions to place macOS debugserver under macOS section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/platform/linux/tunnel_manager_impl.cpp
Comment thread tests/integration/linux/test_two_peers_init.py Outdated
Comment thread tests/integration/linux/test_two_peers_init.py Outdated
@KostiantynYarovyiBf
KostiantynYarovyiBf merged commit 64634d1 into main Feb 24, 2026
1 check passed
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