test: cfg2cmd: expect error for invalid volume's storage content type

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 <d.kral@proxmox.com>
[FE: add 'content' key to storage hash to be slightly more realistic]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Daniel Kral 2025-02-11 17:08:00 +01:00 committed by Fiona Ebner
parent 78a0c43e7c
commit 295d0be11c
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,3 @@
# TEST: Unsupported storage content type in a volume disk
# EXPECT_ERROR: storage 'noimages' does not support content-type 'images'
scsi0: noimages:8006/vm-8006-disk-0.raw,iothread=1,size=32G

View File

@ -31,6 +31,13 @@ my $base_env = {
type => 'dir',
shared => 0,
},
noimages => {
content => {
iso => 1,
},
path => '/var/lib/vz',
type => 'dir',
},
'btrfs-store' => {
content => {
images => 1,