mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
core: fix tests for debug.go
The plan debug test now needs to provide a schema for the resource types it uses.
This commit is contained in:
parent
0da8fe2087
commit
dc7455887e
@ -9,6 +9,10 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/zclconf/go-cty/cty"
|
||||
|
||||
"github.com/hashicorp/terraform/config/configschema"
|
||||
)
|
||||
|
||||
// debugInfo should be safe when nil
|
||||
@ -94,7 +98,18 @@ func TestDebug_plan(t *testing.T) {
|
||||
|
||||
// run a basic plan
|
||||
m := testModule(t, "plan-good")
|
||||
p := testProvider("aws")
|
||||
p := mockProviderWithResourceTypeSchema("aws_instance", &configschema.Block{
|
||||
Attributes: map[string]*configschema.Attribute{
|
||||
"num": {
|
||||
Type: cty.Number,
|
||||
Optional: true,
|
||||
},
|
||||
"foo": {
|
||||
Type: cty.Number,
|
||||
Optional: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
p.DiffFn = testDiffFn
|
||||
ctx := testContext2(t, &ContextOpts{
|
||||
Config: m,
|
||||
|
Loading…
Reference in New Issue
Block a user