mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-08-23 03:48:35 +00:00
fix(code): update acc tests to PVE 8.2 (#1269)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
6bacbe8b56
commit
0b35f47780
@ -26,13 +26,13 @@ func TestAccDatasourceVersion(t *testing.T) {
|
|||||||
{
|
{
|
||||||
Config: `data "proxmox_virtual_environment_version" "test" {}`,
|
Config: `data "proxmox_virtual_environment_version" "test" {}`,
|
||||||
Check: resource.ComposeAggregateTestCheckFunc(
|
Check: resource.ComposeAggregateTestCheckFunc(
|
||||||
resource.TestCheckResourceAttr(datasourceName, "release", "8.1"),
|
resource.TestCheckResourceAttr(datasourceName, "release", "8.2"),
|
||||||
resource.TestCheckResourceAttrSet(datasourceName, "repository_id"),
|
resource.TestCheckResourceAttrSet(datasourceName, "repository_id"),
|
||||||
resource.TestCheckResourceAttrWith(datasourceName, "version", func(value string) error {
|
resource.TestCheckResourceAttrWith(datasourceName, "version", func(value string) error {
|
||||||
if strings.HasPrefix(value, "8.1") {
|
if strings.HasPrefix(value, "8.2") {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return fmt.Errorf("version %s does not start with 8.1", value)
|
return fmt.Errorf("version %s does not start with 8.2", value)
|
||||||
}),
|
}),
|
||||||
resource.TestCheckResourceAttrSet(datasourceName, "id"),
|
resource.TestCheckResourceAttrSet(datasourceName, "id"),
|
||||||
),
|
),
|
||||||
|
@ -246,20 +246,6 @@ func TestAccResourceVMInitialization(t *testing.T) {
|
|||||||
overwrite_unmanaged = true
|
overwrite_unmanaged = true
|
||||||
}`),
|
}`),
|
||||||
}}},
|
}}},
|
||||||
{"native cloud-init: upgrade packages by default", []resource.TestStep{{
|
|
||||||
Config: te.renderConfig(`
|
|
||||||
resource "proxmox_virtual_environment_vm" "test_vm_cloudinit2" {
|
|
||||||
node_name = "{{.NodeName}}"
|
|
||||||
started = false
|
|
||||||
initialization {
|
|
||||||
}
|
|
||||||
}`),
|
|
||||||
Check: resource.ComposeTestCheckFunc(
|
|
||||||
testResourceAttributes("proxmox_virtual_environment_vm.test_vm_cloudinit2", map[string]string{
|
|
||||||
"initialization.0.upgrade": "true",
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
}}},
|
|
||||||
{"native cloud-init: do not upgrade packages", []resource.TestStep{{
|
{"native cloud-init: do not upgrade packages", []resource.TestStep{{
|
||||||
Config: te.renderConfig(`
|
Config: te.renderConfig(`
|
||||||
resource "proxmox_virtual_environment_vm" "test_vm_cloudinit3" {
|
resource "proxmox_virtual_environment_vm" "test_vm_cloudinit3" {
|
||||||
|
Loading…
Reference in New Issue
Block a user