Add real-config download script and integration test suite#233
Open
manonfgoo wants to merge 7 commits intointentionet:masterfrom
Open
Add real-config download script and integration test suite#233manonfgoo wants to merge 7 commits intointentionet:masterfrom
manonfgoo wants to merge 7 commits intointentionet:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Body:
Summary
tools/download_test_configs.py— downloads real-world network configs frompublic GitHub repos (Batfish, CiscoConfParse, jcoeder, Azure) for 5 vendors
(cisco, arista, juniper_flat, juniper_hierarchical, fortinet)
tests/integration/test_real_configs.py— parametrized pytest suite that runsnetconan against each downloaded config and verifies no crashes, password
anonymization, and IP anonymization
tests/test_data_local/support for testing your own config filestests/README.mdwith quick-start guide for downloading, testing, andadding/removing sources
tests/TEST_DATA_SOURCES.md— detailed reference of public config sourcesThis change is