Skip to content

Add real-config download script and integration test suite#233

Open
manonfgoo wants to merge 7 commits intointentionet:masterfrom
manonfgoo:feature/test-data-sources
Open

Add real-config download script and integration test suite#233
manonfgoo wants to merge 7 commits intointentionet:masterfrom
manonfgoo:feature/test-data-sources

Conversation

@manonfgoo
Copy link
Copy Markdown
Contributor

@manonfgoo manonfgoo commented Mar 23, 2026

Body:

Summary

  • Add tools/download_test_configs.py — downloads real-world network configs from
    public GitHub repos (Batfish, CiscoConfParse, jcoeder, Azure) for 5 vendors
    (cisco, arista, juniper_flat, juniper_hierarchical, fortinet)
  • Add tests/integration/test_real_configs.py — parametrized pytest suite that runs
    netconan against each downloaded config and verifies no crashes, password
    anonymization, and IP anonymization
  • Add tests/test_data_local/ support for testing your own config files
  • Add tests/README.md with quick-start guide for downloading, testing, and
    adding/removing sources
  • Add tests/TEST_DATA_SOURCES.md — detailed reference of public config sources

This change is Reviewable

Manon Goo and others added 7 commits March 23, 2026 09:59
Add tests/TEST_DATA_SOURCES.md documenting where to find real-world
network configs online for each vendor format netconan supports
(Cisco IOS, Arista EOS, Juniper JunOS, Fortinet FortiOS, AWS VPN,
SNMP). Includes download instructions and usage tips.

Add tests/test_data/ to .gitignore for downloaded configs.
Add many more real-world config repositories found through thorough
GitHub searching:

- Multi-vendor section: Batfish, CiscoConfParse, Azure VPN samples,
  Oxidized, containerlab topologies
- Cisco: ciscoconfparse fixtures, tireland1985 lab configs, ccat,
  bbartik router configs
- Arista: HPEIMCUtils sample, arista-network-ci, ceos_lab_demo,
  AVD EVPN webinar, multi-vendor-python
- Juniper set-style: jcoeder/juniper-configurations (28 snippets),
  flightlesstux SRX config
- Juniper hierarchical: Azure VPN SRX configs, jtkristoff templates,
  junoser parser fixtures
- Fortinet: FortiLab-VPN-IPSEC backup files, fortigate-terraform-deploy,
  fgtconfig analysis tool
- AWS VPN: PackeTsar IPv6 VPN, cloudposse terraform module,
  aws_vpn_config downloader, Azure Cisco ASA samples
- SNMP: LibreNMS multi-vendor guide, JunOS SNMPv3 gist,
  net-snmp example conf, ansible SNMP playbooks
Add tools/download_test_configs.py to download real-world network configs
from public GitHub repos (Batfish, CiscoConfParse, jcoeder, Azure VPN)
into tests/test_data/ for 5 vendors (cisco, arista, juniper_flat,
juniper_hierarchical, fortinet).

Add tests/integration/test_real_configs.py with parametrized pytest tests
that discover downloaded configs and verify netconan processes them without
crashes, anonymizes password patterns, and changes IP addresses.

The integration tests skip gracefully when test data is not downloaded.
Add tests/README.md with quick-start guide covering how to download
test data, run integration tests, add your own local configs, and
add/remove download sources.

Add tests/test_data_local/ as a second scan directory so users can
drop in their own config files without mixing with downloaded data.
Both directories are git-ignored.
Reformat assert message parenthesization to match ruff's
preferred style after merging origin/master.
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