Skip to content

Network Mapper: Add Docker-based integration testing with CI/CD gates - #11

Merged
NickBorgers merged 1 commit into
mainfrom
add-integration-tests
Nov 8, 2025
Merged

Network Mapper: Add Docker-based integration testing with CI/CD gates#11
NickBorgers merged 1 commit into
mainfrom
add-integration-tests

Conversation

@NickBorgers

Copy link
Copy Markdown
Owner

Summary

Implements comprehensive integration testing infrastructure using Docker Compose and Makefile, with automatic execution in CI/CD pipelines to gate releases.

Changes

🐳 Docker Compose Test Environment

  • docker-compose.test.yml: Multi-network test environment with:
    • 3 isolated networks simulating home (192.168.1.0/24), corporate (10.10.0.0/24), and alternative (192.168.0.0/24) subnets
    • Nginx services on each network for HTTP discovery testing
    • SSDP/UPnP service for multicast service discovery
    • Healthchecks using curl to ensure services are ready before tests run
    • Dedicated test-runner service with clear output formatting

🛠️ Makefile Integration

  • make test-integration: Full integration test with automatic cleanup
  • make test-integration-quick: Fast test without cleanup for debugging
  • make test-integration-clean: Manual cleanup of containers
  • make (no args): Shows help menu by default

🔒 CI/CD Release Gates

  • build.yml: Added integration-test job that runs after unit tests on every PR/push
  • release.yml: Requires both unit and integration tests to pass before creating releases
  • Prevents broken releases: Integration tests must discover all 3 networks, gateways, and services

Test Results

✅ Integration test successfully validates:

  • Discovery of all 3 network segments
  • Detection of all gateway IPs (192.168.1.1, 10.10.0.1, 192.168.0.1)
  • HTTP service discovery on nginx instances
  • SSDP/UPnP multicast service discovery
  • Cross-network intelligent subnet detection

Motivation

Previously, releases could ship with network discovery regressions because there were no automated end-to-end tests. This PR ensures every release is validated against realistic multi-network scenarios.

Test Plan

  • Local testing: make test-integration passes
  • Verifies multi-network discovery works correctly
  • CI pipeline: Will validate on merge

🤖 Generated with Claude Code

Implement comprehensive integration testing infrastructure using Docker Compose and Makefile, with automatic execution in CI/CD pipelines before releases.

Changes:
- Add docker-compose.test.yml with multi-network test environment
  - 3 test networks (192.168.1.0/24, 10.10.0.0/24, 192.168.0.0/24)
  - Nginx services for HTTP discovery testing
  - SSDP/UPnP service for service discovery testing
  - Healthchecks using curl to ensure services are ready
  - Dedicated test-runner service with clear output formatting

- Enhance Makefile with integration test targets
  - make test-integration: Full test with automatic cleanup
  - make test-integration-quick: Fast test without cleanup for debugging
  - make test-integration-clean: Manual cleanup
  - make (no args): Shows help menu by default

- Integrate tests into CI/CD pipelines
  - build.yml: Add integration-test job after unit tests
  - release.yml: Require both unit and integration tests to pass before release
  - Prevents releases if integration tests fail

- Add test-data configuration files
  - Custom nginx configs for test services
  - README documenting test environment

This ensures all releases are validated against real multi-network scenarios, preventing regressions in network discovery functionality.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@NickBorgers NickBorgers changed the title Add Docker-based integration testing with CI/CD gates Network Mapper: Add Docker-based integration testing with CI/CD gates Nov 8, 2025
@NickBorgers
NickBorgers merged commit fa9ddd7 into main Nov 8, 2025
5 of 7 checks 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.

1 participant