Skip to content

Commit

Permalink
fix(code): update acc tests to PVE 8.2 (#1269)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
  • Loading branch information
bpg committed May 6, 2024
1 parent 6bacbe8 commit 0b35f47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
6 changes: 3 additions & 3 deletions fwprovider/tests/datasource_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ func TestAccDatasourceVersion(t *testing.T) {
{
Config: `data "proxmox_virtual_environment_version" "test" {}`,
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr(datasourceName, "release", "8.1"),
resource.TestCheckResourceAttr(datasourceName, "release", "8.2"),
resource.TestCheckResourceAttrSet(datasourceName, "repository_id"),
resource.TestCheckResourceAttrWith(datasourceName, "version", func(value string) error {
if strings.HasPrefix(value, "8.1") {
if strings.HasPrefix(value, "8.2") {
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"),
),
Expand Down
14 changes: 0 additions & 14 deletions fwprovider/tests/resource_vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,20 +246,6 @@ func TestAccResourceVMInitialization(t *testing.T) {
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{{
Config: te.renderConfig(`
resource "proxmox_virtual_environment_vm" "test_vm_cloudinit3" {
Expand Down

0 comments on commit 0b35f47

Please sign in to comment.