Skip to content

Commit

Permalink
Merge pull request #353 from hashicorp/tfplugin5.2-v1
Browse files Browse the repository at this point in the history
Update to tfplugin 5.2, map new protocol fields (v1)
  • Loading branch information
paultyng authored Mar 19, 2020
2 parents d3b1ac9 + 46f5c10 commit 7963e72
Show file tree
Hide file tree
Showing 73 changed files with 2,559 additions and 2,285 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ generate:
protobuf:
bash scripts/protobuf-check.sh
bash internal/tfplugin5/generate.sh
bash internal/plans/internal/planproto/generate.sh

fmt:
gofmt -w $(GOFMT_FILES)
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/davecgh/go-spew v1.1.1
github.com/go-test/deep v1.0.3
github.com/golang/mock v1.3.1
github.com/golang/protobuf v1.3.2
github.com/golang/protobuf v1.3.4
github.com/golang/snappy v0.0.1
github.com/google/go-cmp v0.3.1
github.com/google/uuid v1.1.1
Expand Down Expand Up @@ -47,8 +47,9 @@ require (
github.com/zclconf/go-cty v1.2.1
github.com/zclconf/go-cty-yaml v1.0.1
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa // indirect
golang.org/x/net v0.0.0-20200301022130-244492dfa37a
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 // indirect
golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0
google.golang.org/grpc v1.23.0
google.golang.org/genproto v0.0.0-20200310143817-43be25429f5a // indirect
google.golang.org/grpc v1.27.1
)
19 changes: 16 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d h1:xDfNPAt8lFiC1U
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68=
Expand All @@ -52,6 +55,9 @@ github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.3.4 h1:87PNWwrRvUSnqS4dlcBU/ftvOIBep4sYuBLlh6rX2wk=
github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
Expand Down Expand Up @@ -165,6 +171,7 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI=
github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/spf13/afero v1.2.2 h1:5jhuqJyZCZf2JRofRvN/nIFgIWNzPa3/Vz8mYylgbWc=
Expand Down Expand Up @@ -218,8 +225,9 @@ golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb h1:TR699M2v0qoKTOHxeLgp6zPqaQNs74f01a/ob9W0qko=
golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a h1:GuSPYbZzB5/dcLNCwLQLsg3obCJtX9IJhpXkvY7kzk0=
golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
Expand All @@ -242,8 +250,8 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa h1:KIDDMLT1O0Nr7TSxp8xM5tJcdn8tgyAONntO829og1M=
golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
Expand Down Expand Up @@ -281,12 +289,17 @@ google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRn
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200310143817-43be25429f5a h1:lRlI5zu6AFy3iU/F8YWyNrAmn/tPCnhiTxfwhWb76eU=
google.golang.org/genproto v0.0.0-20200310143817-43be25429f5a/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1 h1:zvIju4sqAGvwKspUQOhwnpcqSbzi7/H6QomNNjTL4sk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
Expand Down
2 changes: 1 addition & 1 deletion helper/resource/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (m *Map) Refresh(
// a ResourceProvider.
func (m *Map) Resources() []terraform.ResourceType {
ks := make([]string, 0, len(m.Mapping))
for k, _ := range m.Mapping {
for k := range m.Mapping {
ks = append(ks, k)
}
sort.Strings(ks)
Expand Down
10 changes: 5 additions & 5 deletions helper/resource/map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ import (
func TestMapResources(t *testing.T) {
m := &Map{
Mapping: map[string]Resource{
"aws_elb": Resource{},
"aws_instance": Resource{},
"aws_elb": {},
"aws_instance": {},
},
}

rts := m.Resources()

expected := []terraform.ResourceType{
terraform.ResourceType{
{
Name: "aws_elb",
},
terraform.ResourceType{
{
Name: "aws_instance",
},
}
Expand All @@ -35,7 +35,7 @@ func TestMapResources(t *testing.T) {
func TestMapValidate(t *testing.T) {
m := &Map{
Mapping: map[string]Resource{
"aws_elb": Resource{
"aws_elb": {
ConfigValidator: &config.Validator{
Required: []string{"foo"},
},
Expand Down
22 changes: 11 additions & 11 deletions helper/resource/state_shim_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func TestStateShim(t *testing.T) {
expected := &terraform.State{
Version: 3,
Modules: []*terraform.ModuleState{
&terraform.ModuleState{
{
Path: []string{"root"},
Outputs: map[string]*terraform.OutputState{
"bar": {
Expand All @@ -191,7 +191,7 @@ func TestStateShim(t *testing.T) {
},
},
Resources: map[string]*terraform.ResourceState{
"test_thing.baz": &terraform.ResourceState{
"test_thing.baz": {
Type: "test_thing",
Provider: "provider.test",
Primary: &terraform.InstanceState{
Expand All @@ -202,7 +202,7 @@ func TestStateShim(t *testing.T) {
},
},
},
"test_thing.foo": &terraform.ResourceState{
"test_thing.foo": {
Type: "test_thing",
Provider: "provider.test",
Primary: &terraform.InstanceState{
Expand All @@ -219,10 +219,10 @@ func TestStateShim(t *testing.T) {
},
},
},
&terraform.ModuleState{
{
Path: []string{"root", "child"},
Resources: map[string]*terraform.ResourceState{
"test_thing.baz": &terraform.ResourceState{
"test_thing.baz": {
Type: "test_thing",
Provider: "module.child.provider.test",
Primary: &terraform.InstanceState{
Expand All @@ -243,7 +243,7 @@ func TestStateShim(t *testing.T) {
},
Dependencies: []string{"data.test_data_thing.foo"},
},
"data.test_data_thing.foo": &terraform.ResourceState{
"data.test_data_thing.foo": {
Type: "test_data_thing",
Provider: "module.child.provider.test",
Primary: &terraform.InstanceState{
Expand All @@ -254,7 +254,7 @@ func TestStateShim(t *testing.T) {
},
},
},
"test_thing.lots.0": &terraform.ResourceState{
"test_thing.lots.0": {
Type: "test_thing",
Provider: "module.child.provider.test",
Primary: &terraform.InstanceState{
Expand All @@ -265,7 +265,7 @@ func TestStateShim(t *testing.T) {
},
},
},
"test_thing.lots.1": &terraform.ResourceState{
"test_thing.lots.1": {
Type: "test_thing",
Provider: "module.child.provider.test",
Primary: &terraform.InstanceState{
Expand All @@ -277,7 +277,7 @@ func TestStateShim(t *testing.T) {
Tainted: true,
},
},
"test_thing.single_count": &terraform.ResourceState{
"test_thing.single_count": {
Type: "test_thing",
Provider: "module.child.provider.test",
Primary: &terraform.InstanceState{
Expand All @@ -296,7 +296,7 @@ func TestStateShim(t *testing.T) {
providers := map[string]terraform.ResourceProvider{
"test": &schema.Provider{
ResourcesMap: map[string]*schema.Resource{
"test_thing": &schema.Resource{
"test_thing": {
Schema: map[string]*schema.Schema{
"id": {Type: schema.TypeString, Computed: true},
"fizzle": {Type: schema.TypeString, Optional: true},
Expand All @@ -305,7 +305,7 @@ func TestStateShim(t *testing.T) {
},
},
DataSourcesMap: map[string]*schema.Resource{
"test_data_thing": &schema.Resource{
"test_data_thing": {
Schema: map[string]*schema.Schema{
"id": {Type: schema.TypeString, Computed: true},
"fuzzle": {Type: schema.TypeString, Optional: true},
Expand Down
4 changes: 2 additions & 2 deletions helper/resource/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -873,12 +873,12 @@ func testIDOnlyRefresh(c TestCase, opts terraform.ContextOpts, step TestStep, r
expected := r.Primary.Attributes
// Remove fields we're ignoring
for _, v := range c.IDRefreshIgnore {
for k, _ := range actual {
for k := range actual {
if strings.HasPrefix(k, v) {
delete(actual, k)
}
}
for k, _ := range expected {
for k := range expected {
if strings.HasPrefix(k, v) {
delete(expected, k)
}
Expand Down
2 changes: 1 addition & 1 deletion helper/resource/testing_import_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func testStepImportState(
Config: cfg,

Targets: []*terraform.ImportTarget{
&terraform.ImportTarget{
{
Addr: importAddr,
ID: importId,
},
Expand Down
30 changes: 15 additions & 15 deletions helper/resource/testing_import_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestTest_importState(t *testing.T) {

mp := testProvider()
mp.ImportStateReturn = []*terraform.InstanceState{
&terraform.InstanceState{
{
ID: "foo",
Ephemeral: terraform.EphemeralState{Type: "test_instance"},
},
Expand Down Expand Up @@ -42,7 +42,7 @@ func TestTest_importState(t *testing.T) {
},

Steps: []TestStep{
TestStep{
{
Config: testConfigStrProvider,
ResourceName: "test_instance.foo",
ImportState: true,
Expand All @@ -65,7 +65,7 @@ func TestTest_importStateFail(t *testing.T) {

mp := testProvider()
mp.ImportStateReturn = []*terraform.InstanceState{
&terraform.InstanceState{
{
ID: "bar",
Ephemeral: terraform.EphemeralState{Type: "test_instance"},
},
Expand Down Expand Up @@ -94,7 +94,7 @@ func TestTest_importStateFail(t *testing.T) {
},

Steps: []TestStep{
TestStep{
{
Config: testConfigStrProvider,
ResourceName: "test_instance.foo",
ImportState: true,
Expand Down Expand Up @@ -143,7 +143,7 @@ func TestTest_importStateDetectId(t *testing.T) {
}

return []*terraform.InstanceState{
&terraform.InstanceState{
{
ID: "bar",
Ephemeral: terraform.EphemeralState{Type: "test_instance"},
},
Expand All @@ -168,10 +168,10 @@ func TestTest_importStateDetectId(t *testing.T) {
},

Steps: []TestStep{
TestStep{
{
Config: testConfigStr,
},
TestStep{
{
Config: testConfigStr,
ResourceName: "test_instance.foo",
ImportState: true,
Expand Down Expand Up @@ -306,7 +306,7 @@ func TestTest_importStateVerify(t *testing.T) {
}

return []*terraform.InstanceState{
&terraform.InstanceState{
{
ID: "foo",
Ephemeral: terraform.EphemeralState{Type: "test_instance"},
},
Expand All @@ -320,10 +320,10 @@ func TestTest_importStateVerify(t *testing.T) {
},

Steps: []TestStep{
TestStep{
{
Config: testConfigStr,
},
TestStep{
{
Config: testConfigStr,
ResourceName: "test_instance.foo",
ImportState: true,
Expand Down Expand Up @@ -371,7 +371,7 @@ func TestTest_importStateVerifyFail(t *testing.T) {
}

return []*terraform.InstanceState{
&terraform.InstanceState{
{
ID: "foo",
Ephemeral: terraform.EphemeralState{Type: "test_instance"},
},
Expand All @@ -385,10 +385,10 @@ func TestTest_importStateVerifyFail(t *testing.T) {
},

Steps: []TestStep{
TestStep{
{
Config: testConfigStr,
},
TestStep{
{
Config: testConfigStr,
ResourceName: "test_instance.foo",
ImportState: true,
Expand Down Expand Up @@ -444,7 +444,7 @@ func TestTest_importStateIdFunc(t *testing.T) {
},

Steps: []TestStep{
TestStep{
{
Config: testConfigStrProvider,
ResourceName: "test_instance.foo",
ImportState: true,
Expand Down Expand Up @@ -501,7 +501,7 @@ func TestTest_importStateIdFuncFail(t *testing.T) {
},

Steps: []TestStep{
TestStep{
{
Config: testConfigStrProvider,
ResourceName: "test_instance.foo",
ImportState: true,
Expand Down
4 changes: 2 additions & 2 deletions helper/resource/testing_new.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ func testIDRefresh(c TestCase, t *testing.T, wd *tftest.WorkingDir, step TestSte
expected := r.Primary.Attributes
// Remove fields we're ignoring
for _, v := range c.IDRefreshIgnore {
for k, _ := range actual {
for k := range actual {
if strings.HasPrefix(k, v) {
delete(actual, k)
}
}
for k, _ := range expected {
for k := range expected {
if strings.HasPrefix(k, v) {
delete(expected, k)
}
Expand Down
Loading

0 comments on commit 7963e72

Please sign in to comment.