Skip to content

Commit 09c9687

Browse files
committed
test: Qemu Tags, test bug fix
1 parent a01d280 commit 09c9687

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

proxmox/config__qemu_test.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7424,6 +7424,20 @@ func Test_ConfigQemu_get(t *testing.T) {
74247424
Order: util.Pointer(GuestStartupOrder(75)),
74257425
ShutdownTimeout: util.Pointer(TimeDuration(43742)),
74267426
StartupDelay: util.Pointer(TimeDuration(8454))}})}}},
7427+
{category: `Tags`,
7428+
tests: []test{
7429+
{name: `bug`, // in some versions a space is returned when there are no tags.
7430+
input: map[string]any{"tags": string(" ")},
7431+
output: baseConfig(ConfigQemu{
7432+
Tags: util.Pointer(Tags{})})},
7433+
{name: `empty`,
7434+
input: map[string]any{"tags": string("")},
7435+
output: baseConfig(ConfigQemu{
7436+
Tags: util.Pointer(Tags{})})},
7437+
{name: `set`,
7438+
input: map[string]any{"tags": string("a;bb;ccc")},
7439+
output: baseConfig(ConfigQemu{
7440+
Tags: util.Pointer(Tags{"a", "bb", "ccc"})})}}},
74277441
{category: `TPM`,
74287442
tests: []test{
74297443
{name: `All`,

0 commit comments

Comments
 (0)