core: A "go fmt" catchup
Since we started using experimental Go Modules our editor tooling hasn't been fully functional, apparently including format-on-save support. This is a catchup to get everything back straight again.
This commit is contained in:
parent
eddc29d6e4
commit
b229264bd6
|
@ -16,8 +16,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/google/go-cmp/cmp"
|
|
||||||
"github.com/go-test/deep"
|
"github.com/go-test/deep"
|
||||||
|
"github.com/google/go-cmp/cmp"
|
||||||
"github.com/zclconf/go-cty/cty"
|
"github.com/zclconf/go-cty/cty"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/addrs"
|
"github.com/hashicorp/terraform/addrs"
|
||||||
|
@ -1493,7 +1493,7 @@ func TestContext2Apply_dataBasic(t *testing.T) {
|
||||||
p.DiffFn = testDiffFn
|
p.DiffFn = testDiffFn
|
||||||
p.ReadDataSourceResponse = providers.ReadDataSourceResponse{
|
p.ReadDataSourceResponse = providers.ReadDataSourceResponse{
|
||||||
State: cty.ObjectVal(map[string]cty.Value{
|
State: cty.ObjectVal(map[string]cty.Value{
|
||||||
"id": cty.StringVal("yo"),
|
"id": cty.StringVal("yo"),
|
||||||
"foo": cty.NullVal(cty.String),
|
"foo": cty.NullVal(cty.String),
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
@ -2727,7 +2727,7 @@ func TestContext2Apply_orphanResource(t *testing.T) {
|
||||||
|
|
||||||
// At this point both resources should be recorded in the state, along
|
// At this point both resources should be recorded in the state, along
|
||||||
// with the single instance associated with test_thing.one.
|
// with the single instance associated with test_thing.one.
|
||||||
want := states.BuildState(func (s *states.SyncState) {
|
want := states.BuildState(func(s *states.SyncState) {
|
||||||
providerAddr := addrs.ProviderConfig{
|
providerAddr := addrs.ProviderConfig{
|
||||||
Type: "test",
|
Type: "test",
|
||||||
}.Absolute(addrs.RootModuleInstance)
|
}.Absolute(addrs.RootModuleInstance)
|
||||||
|
@ -2744,7 +2744,7 @@ func TestContext2Apply_orphanResource(t *testing.T) {
|
||||||
s.SetResourceMeta(zeroAddr, states.EachList, providerAddr)
|
s.SetResourceMeta(zeroAddr, states.EachList, providerAddr)
|
||||||
s.SetResourceMeta(oneAddr, states.EachList, providerAddr)
|
s.SetResourceMeta(oneAddr, states.EachList, providerAddr)
|
||||||
s.SetResourceInstanceCurrent(oneAddr.Instance(addrs.IntKey(0)), &states.ResourceInstanceObjectSrc{
|
s.SetResourceInstanceCurrent(oneAddr.Instance(addrs.IntKey(0)), &states.ResourceInstanceObjectSrc{
|
||||||
Status: states.ObjectReady,
|
Status: states.ObjectReady,
|
||||||
AttrsJSON: []byte(`{}`),
|
AttrsJSON: []byte(`{}`),
|
||||||
}, providerAddr)
|
}, providerAddr)
|
||||||
})
|
})
|
||||||
|
|
|
@ -38,7 +38,7 @@ func contextFixtureApplyVars(t *testing.T) *contextTestFixture {
|
||||||
c := testModule(t, "apply-vars")
|
c := testModule(t, "apply-vars")
|
||||||
p := mockProviderWithResourceTypeSchema("aws_instance", &configschema.Block{
|
p := mockProviderWithResourceTypeSchema("aws_instance", &configschema.Block{
|
||||||
Attributes: map[string]*configschema.Attribute{
|
Attributes: map[string]*configschema.Attribute{
|
||||||
"id": {Type: cty.String, Computed: true},
|
"id": {Type: cty.String, Computed: true},
|
||||||
"foo": {Type: cty.String, Optional: true},
|
"foo": {Type: cty.String, Optional: true},
|
||||||
"bar": {Type: cty.String, Optional: true},
|
"bar": {Type: cty.String, Optional: true},
|
||||||
"baz": {Type: cty.String, Optional: true},
|
"baz": {Type: cty.String, Optional: true},
|
||||||
|
|
|
@ -10,19 +10,16 @@ import (
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/config/hcl2shim"
|
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/plans"
|
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/states"
|
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/google/go-cmp/cmp"
|
"github.com/google/go-cmp/cmp"
|
||||||
"github.com/zclconf/go-cty/cty"
|
"github.com/zclconf/go-cty/cty"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/addrs"
|
"github.com/hashicorp/terraform/addrs"
|
||||||
|
"github.com/hashicorp/terraform/config/hcl2shim"
|
||||||
"github.com/hashicorp/terraform/configs/configschema"
|
"github.com/hashicorp/terraform/configs/configschema"
|
||||||
|
"github.com/hashicorp/terraform/plans"
|
||||||
"github.com/hashicorp/terraform/providers"
|
"github.com/hashicorp/terraform/providers"
|
||||||
|
"github.com/hashicorp/terraform/states"
|
||||||
"github.com/hashicorp/terraform/tfdiags"
|
"github.com/hashicorp/terraform/tfdiags"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@ package terraform
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/zclconf/go-cty/cty"
|
|
||||||
"github.com/hashicorp/hcl2/hcl"
|
"github.com/hashicorp/hcl2/hcl"
|
||||||
"github.com/hashicorp/hcl2/hcl/hclsyntax"
|
"github.com/hashicorp/hcl2/hcl/hclsyntax"
|
||||||
|
"github.com/zclconf/go-cty/cty"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestProcessIgnoreChangesIndividual(t *testing.T) {
|
func TestProcessIgnoreChangesIndividual(t *testing.T) {
|
||||||
|
|
|
@ -54,7 +54,7 @@ func (b *DestroyPlanGraphBuilder) Steps() []GraphTransformer {
|
||||||
concreteResourceInstanceDeposed := func(a *NodeAbstractResourceInstance, key states.DeposedKey) dag.Vertex {
|
concreteResourceInstanceDeposed := func(a *NodeAbstractResourceInstance, key states.DeposedKey) dag.Vertex {
|
||||||
return &NodePlanDeposedResourceInstanceObject{
|
return &NodePlanDeposedResourceInstanceObject{
|
||||||
NodeAbstractResourceInstance: a,
|
NodeAbstractResourceInstance: a,
|
||||||
DeposedKey: key,
|
DeposedKey: key,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ func (b *PlanGraphBuilder) Steps() []GraphTransformer {
|
||||||
concreteResourceInstanceDeposed := func(a *NodeAbstractResourceInstance, key states.DeposedKey) dag.Vertex {
|
concreteResourceInstanceDeposed := func(a *NodeAbstractResourceInstance, key states.DeposedKey) dag.Vertex {
|
||||||
return &NodePlanDeposedResourceInstanceObject{
|
return &NodePlanDeposedResourceInstanceObject{
|
||||||
NodeAbstractResourceInstance: a,
|
NodeAbstractResourceInstance: a,
|
||||||
DeposedKey: key,
|
DeposedKey: key,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ func (b *RefreshGraphBuilder) Steps() []GraphTransformer {
|
||||||
// The "Plan" node type also handles refreshing behavior.
|
// The "Plan" node type also handles refreshing behavior.
|
||||||
return &NodePlanDeposedResourceInstanceObject{
|
return &NodePlanDeposedResourceInstanceObject{
|
||||||
NodeAbstractResourceInstance: a,
|
NodeAbstractResourceInstance: a,
|
||||||
DeposedKey: key,
|
DeposedKey: key,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ package terraform
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hashicorp/terraform/addrs"
|
"github.com/hashicorp/terraform/addrs"
|
||||||
"github.com/hashicorp/terraform/configs/configschema"
|
|
||||||
"github.com/hashicorp/terraform/configs"
|
"github.com/hashicorp/terraform/configs"
|
||||||
|
"github.com/hashicorp/terraform/configs/configschema"
|
||||||
|
|
||||||
"github.com/hashicorp/terraform/dag"
|
"github.com/hashicorp/terraform/dag"
|
||||||
)
|
)
|
||||||
|
|
|
@ -22,7 +22,7 @@ import (
|
||||||
type NodeApplyableResourceInstance struct {
|
type NodeApplyableResourceInstance struct {
|
||||||
*NodeAbstractResourceInstance
|
*NodeAbstractResourceInstance
|
||||||
|
|
||||||
destroyNode GraphNodeDestroyerCBD
|
destroyNode GraphNodeDestroyerCBD
|
||||||
graphNodeDeposer // implementation of GraphNodeDeposer
|
graphNodeDeposer // implementation of GraphNodeDeposer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue