mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 18:42:58 +00:00
Additional test cases
This commit is contained in:
parent
3ba91855cc
commit
091f162fae
@ -6,6 +6,7 @@ cache:
|
|||||||
directories:
|
directories:
|
||||||
- $HOME/.cache/go-build
|
- $HOME/.cache/go-build
|
||||||
- $HOME/gopath/pkg/mod
|
- $HOME/gopath/pkg/mod
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.13.x
|
- 1.13.x
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TestProviderInstantiation() tests whether the Provider instance can be instantiated.
|
// TestProviderInstantiation() tests whether the Provider instance can be instantiated.
|
||||||
@ -16,3 +18,26 @@ func TestProviderInstantiation(t *testing.T) {
|
|||||||
t.Fatalf("Cannot instantiate Provider")
|
t.Fatalf("Cannot instantiate Provider")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestProviderSchema() tests the Provider schema.
|
||||||
|
func TestProviderSchema(t *testing.T) {
|
||||||
|
s := &schema.Resource{
|
||||||
|
Schema: Provider().Schema,
|
||||||
|
}
|
||||||
|
|
||||||
|
testOptionalArguments(t, s, []string{
|
||||||
|
mkProviderVirtualEnvironment,
|
||||||
|
})
|
||||||
|
|
||||||
|
veSchema := testNestedSchemaExistence(t, s, mkProviderVirtualEnvironment)
|
||||||
|
|
||||||
|
testRequiredArguments(t, veSchema, []string{
|
||||||
|
mkProviderVirtualEnvironmentEndpoint,
|
||||||
|
mkProviderVirtualEnvironmentPassword,
|
||||||
|
mkProviderVirtualEnvironmentUsername,
|
||||||
|
})
|
||||||
|
|
||||||
|
testOptionalArguments(t, veSchema, []string{
|
||||||
|
mkProviderVirtualEnvironmentInsecure,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user