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 A55221FF16B for ; Mon, 16 Sep 2024 18:39:10 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DEBBDB8F8; Mon, 16 Sep 2024 18:39:14 +0200 (CEST) From: Daniel Kral To: pve-devel@lists.proxmox.com Date: Mon, 16 Sep 2024 18:38:31 +0200 Message-Id: <20240916163839.236908-2-d.kral@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20240916163839.236908-1-d.kral@proxmox.com> References: <20240916163839.236908-1-d.kral@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.004 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] [RFC qemu-server 1/9] test: cfg2cmd: expect error for invalid volume's storage content type 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" Tests whether when running `config_to_command` it will correctly fail with an error message that a volume cannot be used if the underlying storage does not support its content type. Signed-off-by: Daniel Kral --- test/cfg2cmd/unsupported-storage-content-type.conf | 3 +++ test/run_config2command_tests.pl | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 test/cfg2cmd/unsupported-storage-content-type.conf diff --git a/test/cfg2cmd/unsupported-storage-content-type.conf b/test/cfg2cmd/unsupported-storage-content-type.conf new file mode 100644 index 00000000..35e789b2 --- /dev/null +++ b/test/cfg2cmd/unsupported-storage-content-type.conf @@ -0,0 +1,3 @@ +# TEST: Unsupported storage content type in a volume disk +# EXPECT_ERROR: storage 'no-images' does not support content-type 'images' +scsi0: no-images:8006/vm-8006-disk-0.raw,iothread=1,size=32G diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl index d48ef562..32d645f2 100755 --- a/test/run_config2command_tests.pl +++ b/test/run_config2command_tests.pl @@ -30,6 +30,10 @@ my $base_env = { type => 'dir', shared => 0, }, + 'no-images' => { + path => '/var/lib/vz', + type => 'dir', + }, 'btrfs-store' => { content => { images => 1, @@ -68,7 +72,7 @@ my $base_env = { content => { images => 1, } - } + }, } }, vmid => 8006, -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel