0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-06 14:03:58 +00:00
terraform-provider-proxmox/fwprovider/test/datasource_sdn_vnet_test.go
MacherelR 58ff2ff240 feat(sdn)!: add SDN support for zones, vnets, subnets with validation and tests
BREAKING CHANGE: introduces sdn support.

Signed-off-by: MacherelR <64424331+MacherelR@users.noreply.github.com>
2025-06-24 08:31:40 +02:00

55 lines
1.1 KiB
Go

//go:build acceptance || all
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package test
import (
"testing"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
)
func TestAccDatasourceSDNVNet(t *testing.T) {
t.Parallel()
te := InitEnvironment(t)
tests := []struct {
name string
steps []resource.TestStep
}{
{
"read sdn vnet attributes",
[]resource.TestStep{{
Config: te.RenderConfig(`
data "proxmox_virtual_environment_sdn_vnet" "vnet_ex" {
name = "{{ .VnetName }}"
}
`),
Check: resource.ComposeTestCheckFunc(
ResourceAttributesSet("data.proxmox_virtual_environment_sdn_vnet.vnet_ex", []string{
"id",
"name",
"zone",
"type",
}),
),
}},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
resource.ParallelTest(t, resource.TestCase{
ProtoV6ProviderFactories: te.AccProviders,
Steps: tt.steps,
})
})
}
}