From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 69DAA1FF13C for ; Thu, 19 Feb 2026 16:25:56 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1A5611BF17; Thu, 19 Feb 2026 16:26:28 +0100 (CET) From: Gabriel Goller To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox-ve-rs v2 3/3] ve-config: add integration tests for IS-IS fabrics Date: Thu, 19 Feb 2026 16:25:23 +0100 Message-ID: <20260219152544.427439-4-g.goller@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260219152544.427439-1-g.goller@proxmox.com> References: <20260219152544.427439-1-g.goller@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1771514741264 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.003 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: V7DUK7EMIMNHULINL7CHLFE2YFZ56AHK X-Message-ID-Hash: V7DUK7EMIMNHULINL7CHLFE2YFZ56AHK X-MailFrom: g.goller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add three integration tests for the IS-IS fabrics: a simple one, one with dualstack ipv6 and ipv4, and one with ipv6 only. Signed-off-by: Gabriel Goller --- .../tests/fabric/cfg/isis_default/fabrics.cfg | 18 ++++++ .../fabric/cfg/isis_dualstack/fabrics.cfg | 22 +++++++ .../fabric/cfg/isis_ipv6_only/fabrics.cfg | 18 ++++++ proxmox-ve-config/tests/fabric/main.rs | 63 +++++++++++++++++++ .../snapshots/fabric__isis_default_pve.snap | 36 +++++++++++ .../snapshots/fabric__isis_default_pve1.snap | 35 +++++++++++ .../snapshots/fabric__isis_dualstack_pve.snap | 48 ++++++++++++++ .../snapshots/fabric__isis_ipv6_only_pve.snap | 37 +++++++++++ 8 files changed, 277 insertions(+) create mode 100644 proxmox-ve-config/tests/fabric/cfg/isis_default/fabrics.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/isis_dualstack/fabrics.cfg create mode 100644 proxmox-ve-config/tests/fabric/cfg/isis_ipv6_only/fabrics.cfg create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve.snap create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve1.snap create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__isis_dualstack_pve.snap create mode 100644 proxmox-ve-config/tests/fabric/snapshots/fabric__isis_ipv6_only_pve.snap diff --git a/proxmox-ve-config/tests/fabric/cfg/isis_default/fabrics.cfg b/proxmox-ve-config/tests/fabric/cfg/isis_default/fabrics.cfg new file mode 100644 index 000000000000..161831977bc6 --- /dev/null +++ b/proxmox-ve-config/tests/fabric/cfg/isis_default/fabrics.cfg @@ -0,0 +1,18 @@ +isis_fabric: uwu + hello_interval 4 + ip_prefix 192.168.2.0/24 + +isis_node: uwu_pve + interfaces name=ens20,hello_multiplier=50 + interfaces name=ens19 + ip 192.168.2.8 + +isis_node: uwu_pve1 + interfaces name=ens19 + interfaces name=ens20 + ip 192.168.2.9 + +isis_node: uwu_pve2 + interfaces name=ens19 + interfaces name=ens20 + ip 192.168.2.10 diff --git a/proxmox-ve-config/tests/fabric/cfg/isis_dualstack/fabrics.cfg b/proxmox-ve-config/tests/fabric/cfg/isis_dualstack/fabrics.cfg new file mode 100644 index 000000000000..c8a0458d2e88 --- /dev/null +++ b/proxmox-ve-config/tests/fabric/cfg/isis_dualstack/fabrics.cfg @@ -0,0 +1,22 @@ +isis_fabric: uwu + hello_interval 4 + ip_prefix 192.168.2.0/24 + ip6_prefix 2001:db8::0/64 + +isis_node: uwu_pve + interfaces name=ens20,hello_multiplier=50 + interfaces name=ens19 + ip 192.168.2.8 + ip6 2001:db8::1 + +isis_node: uwu_pve1 + interfaces name=ens19 + interfaces name=ens20 + ip 192.168.2.9 + ip6 2001:db8::2 + +isis_node: uwu_pve2 + interfaces name=ens19 + interfaces name=ens20 + ip 192.168.2.10 + ip6 2001:db8::3 diff --git a/proxmox-ve-config/tests/fabric/cfg/isis_ipv6_only/fabrics.cfg b/proxmox-ve-config/tests/fabric/cfg/isis_ipv6_only/fabrics.cfg new file mode 100644 index 000000000000..584ecbbc4ef9 --- /dev/null +++ b/proxmox-ve-config/tests/fabric/cfg/isis_ipv6_only/fabrics.cfg @@ -0,0 +1,18 @@ +isis_fabric: uwu + hello_interval 4 + ip6_prefix a:b::0/75 + +isis_node: uwu_pve + interfaces name=ens20,hello_multiplier=50 + interfaces name=ens19 + ip6 a:b::a + +isis_node: uwu_pve1 + interfaces name=ens19 + interfaces name=ens20 + ip6 a:b::b + +isis_node: uwu_pve2 + interfaces name=ens19 + interfaces name=ens20 + ip6 a:b::c diff --git a/proxmox-ve-config/tests/fabric/main.rs b/proxmox-ve-config/tests/fabric/main.rs index 755592ff7482..434227e0c55b 100644 --- a/proxmox-ve-config/tests/fabric/main.rs +++ b/proxmox-ve-config/tests/fabric/main.rs @@ -41,6 +41,35 @@ fn openfabric_default() { insta::assert_snapshot!(helper::reference_name!("pve1"), output); } +#[test] +fn isis_default() { + let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap(); + + let mut frr_config = FrrConfig::default(); + build_fabric( + NodeId::from_string("pve".to_owned()).expect("invalid nodeid"), + config.clone(), + &mut frr_config, + ) + .unwrap(); + + let mut output = dump(&frr_config).expect("error dumping stuff"); + + insta::assert_snapshot!(helper::reference_name!("pve"), output); + + frr_config = FrrConfig::default(); + build_fabric( + NodeId::from_string("pve1".to_owned()).expect("invalid nodeid"), + config.clone(), + &mut frr_config, + ) + .unwrap(); + + output = dump(&frr_config).expect("error dumping stuff"); + + insta::assert_snapshot!(helper::reference_name!("pve1"), output); +} + #[test] fn ospf_default() { let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap(); @@ -144,6 +173,23 @@ fn openfabric_dualstack() { insta::assert_snapshot!(helper::reference_name!("pve"), output); } +#[test] +fn isis_dualstack() { + let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap(); + + let mut frr_config = FrrConfig::default(); + build_fabric( + NodeId::from_string("pve".to_owned()).expect("invalid nodeid"), + config, + &mut frr_config, + ) + .unwrap(); + + let output = dump(&frr_config).expect("error dumping stuff"); + + insta::assert_snapshot!(helper::reference_name!("pve"), output); +} + #[test] fn openfabric_ipv6_only() { let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap(); @@ -160,3 +206,20 @@ fn openfabric_ipv6_only() { insta::assert_snapshot!(helper::reference_name!("pve"), output); } + +#[test] +fn isis_ipv6_only() { + let config = FabricConfig::parse_section_config(helper::get_fabrics_config!()).unwrap(); + + let mut frr_config = FrrConfig::default(); + build_fabric( + NodeId::from_string("pve".to_owned()).expect("invalid nodeid"), + config, + &mut frr_config, + ) + .unwrap(); + + let output = dump(&frr_config).expect("error dumping stuff"); + + insta::assert_snapshot!(helper::reference_name!("pve"), output); +} diff --git a/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve.snap b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve.snap new file mode 100644 index 000000000000..101c005e1725 --- /dev/null +++ b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve.snap @@ -0,0 +1,36 @@ +--- +source: proxmox-ve-config/tests/fabric/main.rs +expression: output +snapshot_kind: text +--- +! +router isis uwu + net 49.0001.1921.6800.2008.00 +exit +! +interface dummy_uwu + ip router isis uwu + isis passive +exit +! +interface ens19 + ip router isis uwu + isis hello-interval 4 + isis network point-to-point +exit +! +interface ens20 + ip router isis uwu + isis hello-interval 4 + isis hello-multiplier 50 + isis network point-to-point +exit +! +access-list pve_isis_uwu_ips permit 192.168.2.0/24 +! +route-map pve_isis permit 100 + match ip address pve_isis_uwu_ips + set src 192.168.2.8 +exit +! +ip protocol isis route-map pve_isis diff --git a/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve1.snap b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve1.snap new file mode 100644 index 000000000000..c647a288e47b --- /dev/null +++ b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_default_pve1.snap @@ -0,0 +1,35 @@ +--- +source: proxmox-ve-config/tests/fabric/main.rs +expression: output +snapshot_kind: text +--- +! +router isis uwu + net 49.0001.1921.6800.2009.00 +exit +! +interface dummy_uwu + ip router isis uwu + isis passive +exit +! +interface ens19 + ip router isis uwu + isis hello-interval 4 + isis network point-to-point +exit +! +interface ens20 + ip router isis uwu + isis hello-interval 4 + isis network point-to-point +exit +! +access-list pve_isis_uwu_ips permit 192.168.2.0/24 +! +route-map pve_isis permit 100 + match ip address pve_isis_uwu_ips + set src 192.168.2.9 +exit +! +ip protocol isis route-map pve_isis diff --git a/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_dualstack_pve.snap b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_dualstack_pve.snap new file mode 100644 index 000000000000..c470f0393ed5 --- /dev/null +++ b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_dualstack_pve.snap @@ -0,0 +1,48 @@ +--- +source: proxmox-ve-config/tests/fabric/main.rs +expression: output +snapshot_kind: text +--- +! +router isis uwu + net 49.0001.1921.6800.2008.00 +exit +! +interface dummy_uwu + ip router isis uwu + ipv6 router isis uwu + isis passive +exit +! +interface ens19 + ip router isis uwu + ipv6 router isis uwu + isis hello-interval 4 + isis network point-to-point +exit +! +interface ens20 + ip router isis uwu + ipv6 router isis uwu + isis hello-interval 4 + isis hello-multiplier 50 + isis network point-to-point +exit +! +ipv6 access-list pve_isis_uwu_ip6s permit 2001:db8::/64 +! +access-list pve_isis_uwu_ips permit 192.168.2.0/24 +! +route-map pve_isis permit 100 + match ip address pve_isis_uwu_ips + set src 192.168.2.8 +exit +! +route-map pve_isis6 permit 110 + match ipv6 address pve_isis_uwu_ip6s + set src 2001:db8::1 +exit +! +ip protocol isis route-map pve_isis +! +ipv6 protocol isis route-map pve_isis6 diff --git a/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_ipv6_only_pve.snap b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_ipv6_only_pve.snap new file mode 100644 index 000000000000..802ce7fa137d --- /dev/null +++ b/proxmox-ve-config/tests/fabric/snapshots/fabric__isis_ipv6_only_pve.snap @@ -0,0 +1,37 @@ +--- +source: proxmox-ve-config/tests/fabric/main.rs +expression: output +snapshot_kind: text +--- +! +router isis uwu + net 49.0001.0000.0000.000a.00 +exit +! +interface dummy_uwu + ipv6 router isis uwu + isis passive +exit +! +interface ens19 + ipv6 router isis uwu + isis hello-interval 4 + isis network point-to-point +exit +! +interface ens20 + ipv6 router isis uwu + isis hello-interval 4 + isis hello-multiplier 50 + isis network point-to-point +exit +! +ipv6 access-list pve_isis_uwu_ip6s permit a:b::/75 +! +route-map pve_isis6 permit 100 + match ipv6 address pve_isis_uwu_ip6s + set src a:b::a +exit +! +! +ipv6 protocol isis route-map pve_isis6 -- 2.47.3