From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id C52AB1FF0C0 for ; Wed, 04 Nov 2026 20:04:24 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id ACE8A2163F; Wed, 04 Nov 2026 20:03:58 +0100 (CET) From: =?UTF-8?q?Michael=20K=C3=B6ppl?= To: pve-devel@lists.proxmox.com Subject: [PATCH e2e-tests 04/38] test framework: move the default container template to the helper Date: Wed, 4 Nov 2026 20:03:11 +0100 Message-ID: <20261104190345.2573464-5-m.koeppl@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261104190345.2573464-1-m.koeppl@proxmox.com> References: <20261104190345.2573464-1-m.koeppl@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1793819033569 X-SPAM-LEVEL: Spam detection results: 0 AWL -2.287 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_DBL_SPAM 5 Contains a spam URL listed in the Spamhaus DBL blocklist [sdn.pm] Message-ID-Hash: TDOTDYBVHPUJ62CUQ3QNU7VHAYPER2EE X-Message-ID-Hash: TDOTDYBVHPUJ62CUQ3QNU7VHAYPER2EE X-MailFrom: m.koeppl@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: The default container template is not specific to the SDN tests. The firewall test already uses it and future tests will too. Move it to Proxmox::Test::Helper, so that tests do not have to import from the SDN helpers. Signed-off-by: Michael Köppl --- Proxmox/Test/Helper.pm | 8 +++++++- Proxmox/Test/SDN.pm | 5 ----- tests/pve_firewall.pl | 3 +-- tests/sdn/test_vlan_zone.pl | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Proxmox/Test/Helper.pm b/Proxmox/Test/Helper.pm index 17b31db..87a0a6d 100644 --- a/Proxmox/Test/Helper.pm +++ b/Proxmox/Test/Helper.pm @@ -3,7 +3,8 @@ use strict; use warnings FATAL => 'all'; use parent 'Exporter'; -our @EXPORT_OK = qw(get_pve_instance get_pbs_instance get_instance get_pve_instances); +our @EXPORT_OK = + qw(CONTAINER_TEMPLATE get_pve_instance get_pbs_instance get_instance get_pve_instances); use JSON; @@ -12,6 +13,11 @@ use Proxmox::Test::ProxmoxInstance; use Proxmox::Test::PVEInstance; use Proxmox::Test::PBSInstance; +# Default container OS template used by various test containers. Single source of truth so a +# template version bump only needs to be done in one place. Tests that need specific templates +# import them separately. +use constant CONTAINER_TEMPLATE => 'local:vztmpl/debian-12-standard_12.12-1_amd64.tar.zst'; + my $config_cache; sub read_config { diff --git a/Proxmox/Test/SDN.pm b/Proxmox/Test/SDN.pm index 4f0b63c..8c27bb8 100644 --- a/Proxmox/Test/SDN.pm +++ b/Proxmox/Test/SDN.pm @@ -4,7 +4,6 @@ use warnings FATAL => 'all'; use parent 'Exporter'; our @EXPORT_OK = qw( - CONTAINER_TEMPLATE apply_sdn_config wait_for_vnet create_test_containers @@ -21,10 +20,6 @@ use Test::More; use Proxmox::Test::Helper qw(get_pve_instance); use Proxmox::Test::Util qw(poll_until); -# Container OS template used by all SDN test containers. Single source of truth so a template -# version bump only needs to be done in one place. -use constant CONTAINER_TEMPLATE => 'local:vztmpl/debian-12-standard_12.12-1_amd64.tar.zst'; - # Wait until the interface backing $vnet exists on every instance in $instances. # # Until a node's reload has run, guests attached to the VNet fail to start with "bridge '' diff --git a/tests/pve_firewall.pl b/tests/pve_firewall.pl index e1f6ec2..fab35b5 100755 --- a/tests/pve_firewall.pl +++ b/tests/pve_firewall.pl @@ -5,9 +5,8 @@ use warnings; use Test::More; use lib '.'; -use Proxmox::Test::Helper qw(get_pve_instance); +use Proxmox::Test::Helper qw(CONTAINER_TEMPLATE get_pve_instance); use Proxmox::Test::Util qw(poll_until); -use Proxmox::Test::SDN qw(CONTAINER_TEMPLATE); # End-to-end test of the PVE firewall: verifies a rule actually affects the dataplane, rather than # only exercising the firewall config API (which is covered by unit and API-schema tests). diff --git a/tests/sdn/test_vlan_zone.pl b/tests/sdn/test_vlan_zone.pl index d0a412a..0c41dfa 100755 --- a/tests/sdn/test_vlan_zone.pl +++ b/tests/sdn/test_vlan_zone.pl @@ -19,8 +19,8 @@ use warnings; use Test::More; use lib '.'; -use Proxmox::Test::Helper qw(get_pve_instance get_pve_instances get_instance); -use Proxmox::Test::SDN qw(CONTAINER_TEMPLATE apply_sdn_config); +use Proxmox::Test::Helper qw(CONTAINER_TEMPLATE get_pve_instance get_pve_instances get_instance); +use Proxmox::Test::SDN qw(apply_sdn_config); use Proxmox::Test::Testcase; use PVE::JSONSchema; -- 2.47.3