add Provider schema to the contextFixture
This commit is contained in:
parent
672221e38e
commit
edacd9ff4d
|
@ -4,6 +4,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/config/configschema"
|
"github.com/hashicorp/terraform/config/configschema"
|
||||||
|
"github.com/zclconf/go-cty/cty"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestMockResourceProvider_impl(t *testing.T) {
|
func TestMockResourceProvider_impl(t *testing.T) {
|
||||||
|
@ -36,6 +37,22 @@ func mockProviderWithConfigSchema(schema *configschema.Block) *MockResourceProvi
|
||||||
func mockProviderWithResourceTypeSchema(name string, schema *configschema.Block) *MockResourceProvider {
|
func mockProviderWithResourceTypeSchema(name string, schema *configschema.Block) *MockResourceProvider {
|
||||||
return &MockResourceProvider{
|
return &MockResourceProvider{
|
||||||
GetSchemaReturn: &ProviderSchema{
|
GetSchemaReturn: &ProviderSchema{
|
||||||
|
Provider: &configschema.Block{
|
||||||
|
Attributes: map[string]*configschema.Attribute{
|
||||||
|
"string": {
|
||||||
|
Type: cty.String,
|
||||||
|
Optional: true,
|
||||||
|
},
|
||||||
|
"list": {
|
||||||
|
Type: cty.List(cty.String),
|
||||||
|
Optional: true,
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
Type: cty.Map(cty.String),
|
||||||
|
Optional: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ResourceTypes: map[string]*configschema.Block{
|
ResourceTypes: map[string]*configschema.Block{
|
||||||
name: schema,
|
name: schema,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue