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 1E9BD1FF170 for ; Tue, 3 Dec 2024 13:23:39 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7E2F630A9; Tue, 3 Dec 2024 13:23:38 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Tue, 3 Dec 2024 13:23:25 +0100 Message-ID: <20241203122331.383398-2-c.heiss@proxmox.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241203122331.383398-1-c.heiss@proxmox.com> References: <20241203122331.383398-1-c.heiss@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.027 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 Subject: [pve-devel] [PATCH installer 1/4] auto-installer: tests: add tests for raid level case-insensitivity X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" This was fixed as a regression for ZFS and Btrfs in [0] and [1], respectively - to ensure it won't happen again, add some tests as it should be. [0] a9e5f37 ("common: allow lowercase and uppercase zfs raid levels") [1] 33d53b9 ("common: allow lowercase and uppercase btrfs raid levels") Signed-off-by: Christoph Heiss --- .../btrfs_raid_level_uppercase.json | 23 ++++++++++++++ .../btrfs_raid_level_uppercase.toml | 15 ++++++++++ .../zfs_raid_level_uppercase.json | 30 +++++++++++++++++++ .../zfs_raid_level_uppercase.toml | 15 ++++++++++ 4 files changed, 83 insertions(+) create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/btrfs_raid_level_uppercase.json create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/btrfs_raid_level_uppercase.toml create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/zfs_raid_level_uppercase.json create mode 100644 proxmox-auto-installer/tests/resources/parse_answer/zfs_raid_level_uppercase.toml diff --git a/proxmox-auto-installer/tests/resources/parse_answer/btrfs_raid_level_uppercase.json b/proxmox-auto-installer/tests/resources/parse_answer/btrfs_raid_level_uppercase.json new file mode 100644 index 0000000..0c5e9d0 --- /dev/null +++ b/proxmox-auto-installer/tests/resources/parse_answer/btrfs_raid_level_uppercase.json @@ -0,0 +1,23 @@ +{ + "autoreboot": 1, + "cidr": "192.168.1.114/24", + "country": "at", + "dns": "192.168.1.254", + "domain": "testinstall", + "disk_selection": { + "6": "6", + "7": "7" + }, + "filesys": "btrfs (RAID1)", + "gateway": "192.168.1.1", + "hdsize": 223.57088470458984, + "existing_storage_auto_rename": 1, + "hostname": "pveauto", + "keymap": "de", + "mailto": "mail@no.invalid", + "mngmt_nic": "eno1", + "root_password": { "plain": "123456" }, + "timezone": "Europe/Vienna", + "btrfs_opts": { "compress": "off" }, + "first_boot": { "enabled": 0 } +} diff --git a/proxmox-auto-installer/tests/resources/parse_answer/btrfs_raid_level_uppercase.toml b/proxmox-auto-installer/tests/resources/parse_answer/btrfs_raid_level_uppercase.toml new file mode 100644 index 0000000..17799af --- /dev/null +++ b/proxmox-auto-installer/tests/resources/parse_answer/btrfs_raid_level_uppercase.toml @@ -0,0 +1,15 @@ +[global] +keyboard = "de" +country = "at" +fqdn = "pveauto.testinstall" +mailto = "mail@no.invalid" +timezone = "Europe/Vienna" +root_password = "123456" + +[network] +source = "from-dhcp" + +[disk-setup] +filesystem = "btrfs" +disk_list = ["sda", "sdb"] +btrfs.raid = "RAID1" diff --git a/proxmox-auto-installer/tests/resources/parse_answer/zfs_raid_level_uppercase.json b/proxmox-auto-installer/tests/resources/parse_answer/zfs_raid_level_uppercase.json new file mode 100644 index 0000000..a8b182c --- /dev/null +++ b/proxmox-auto-installer/tests/resources/parse_answer/zfs_raid_level_uppercase.json @@ -0,0 +1,30 @@ +{ + "autoreboot": 1, + "cidr": "192.168.1.114/24", + "country": "at", + "dns": "192.168.1.254", + "domain": "testinstall", + "disk_selection": { + "6": "6", + "7": "7", + "8": "8" + }, + "filesys": "zfs (RAIDZ-1)", + "gateway": "192.168.1.1", + "hdsize": 223.57088470458984, + "existing_storage_auto_rename": 1, + "hostname": "pveauto", + "keymap": "de", + "mailto": "mail@no.invalid", + "mngmt_nic": "eno1", + "root_password": { "plain": "123456" }, + "timezone": "Europe/Vienna", + "zfs_opts": { + "arc_max": 2048, + "ashift": 12, + "checksum": "on", + "compress": "on", + "copies": 1 + }, + "first_boot": { "enabled": 0 } +} diff --git a/proxmox-auto-installer/tests/resources/parse_answer/zfs_raid_level_uppercase.toml b/proxmox-auto-installer/tests/resources/parse_answer/zfs_raid_level_uppercase.toml new file mode 100644 index 0000000..b797b00 --- /dev/null +++ b/proxmox-auto-installer/tests/resources/parse_answer/zfs_raid_level_uppercase.toml @@ -0,0 +1,15 @@ +[global] +keyboard = "de" +country = "at" +fqdn = "pveauto.testinstall" +mailto = "mail@no.invalid" +timezone = "Europe/Vienna" +root_password = "123456" + +[network] +source = "from-dhcp" + +[disk-setup] +filesystem = "zfs" +disk_list = ["sda", "sdb", "sdc"] +zfs.raid = "RAIDZ-1" -- 2.47.0 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel