mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 02:31:10 +00:00
39 lines
1.2 KiB
Go
39 lines
1.2 KiB
Go
/* 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 proxmoxtf
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
|
|
)
|
|
|
|
// TestDataSourceVirtualEnvironmentRoleInstantiation tests whether the DataSourceVirtualEnvironmentRole instance can be instantiated.
|
|
func TestDataSourceVirtualEnvironmentRoleInstantiation(t *testing.T) {
|
|
s := dataSourceVirtualEnvironmentRole()
|
|
|
|
if s == nil {
|
|
t.Fatalf("Cannot instantiate dataSourceVirtualEnvironmentRole")
|
|
}
|
|
}
|
|
|
|
// TestDataSourceVirtualEnvironmentRoleSchema tests the dataSourceVirtualEnvironmentRole schema.
|
|
func TestDataSourceVirtualEnvironmentRoleSchema(t *testing.T) {
|
|
s := dataSourceVirtualEnvironmentRole()
|
|
|
|
testRequiredArguments(t, s, []string{
|
|
mkDataSourceVirtualEnvironmentRoleID,
|
|
})
|
|
|
|
testComputedAttributes(t, s, []string{
|
|
mkDataSourceVirtualEnvironmentRolePrivileges,
|
|
})
|
|
|
|
testValueTypes(t, s, map[string]schema.ValueType{
|
|
mkDataSourceVirtualEnvironmentRoleID: schema.TypeString,
|
|
mkDataSourceVirtualEnvironmentRolePrivileges: schema.TypeSet,
|
|
})
|
|
}
|