From 4b10c5a87c28b64f15ae8efb869b977e25e3d35e Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Fri, 14 Feb 2020 11:54:10 +0100 Subject: [PATCH] try to reproduce #8730 in tests --- hcl2template/testdata/complete/build.pkr.hcl | 2 +- hcl2template/testdata/complete/variables.pkr.hcl | 4 ++++ hcl2template/types.packer_config_test.go | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hcl2template/testdata/complete/build.pkr.hcl b/hcl2template/testdata/complete/build.pkr.hcl index 64cf16c2e..6a01c01bd 100644 --- a/hcl2template/testdata/complete/build.pkr.hcl +++ b/hcl2template/testdata/complete/build.pkr.hcl @@ -8,7 +8,7 @@ build { provisioner "shell" { name = "provisioner that does something" not_squashed = var.foo - string = "string" + string = "string${var.proxmox_username}" int = "${41 + 1}" int64 = "${42 + 1}" bool = "true" diff --git a/hcl2template/testdata/complete/variables.pkr.hcl b/hcl2template/testdata/complete/variables.pkr.hcl index d144cc1cf..db0b68df5 100644 --- a/hcl2template/testdata/complete/variables.pkr.hcl +++ b/hcl2template/testdata/complete/variables.pkr.hcl @@ -10,6 +10,10 @@ variable "image_id" { default = "image-id-default" } +variable "proxmox_username" { + type = string +} + variable "port" { type = number default = 42 diff --git a/hcl2template/types.packer_config_test.go b/hcl2template/types.packer_config_test.go index 38fed400a..f5019258f 100644 --- a/hcl2template/types.packer_config_test.go +++ b/hcl2template/types.packer_config_test.go @@ -25,6 +25,7 @@ func TestParser_complete(t *testing.T) { "image_id": &Variable{}, "port": &Variable{}, "availability_zone_names": &Variable{}, + "proxmox_username": &Variable{}, }, LocalVariables: Variables{ "feefoo": &Variable{},