Skip to content

Commit

Permalink
Update reflectwalk vendor to fix State.DeepCopy
Browse files Browse the repository at this point in the history
The real reasoning for this can be found in #9, #10, and #11. All
these vendor updates aim to fix that issue, with minor adjustments
  • Loading branch information
mitchellh committed Sep 28, 2016
1 parent 37c880c commit ea342b7
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 20 deletions.
13 changes: 8 additions & 5 deletions terraform/state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package terraform
import (
"bytes"
"encoding/json"
"fmt"
"reflect"
"strings"
"testing"
Expand Down Expand Up @@ -272,11 +273,13 @@ func TestStateDeepCopy(t *testing.T) {
}

for i, tc := range cases {
actual := tc.F(tc.One.DeepCopy())
expected := tc.F(tc.Two)
if !reflect.DeepEqual(actual, expected) {
t.Fatalf("Bad: %d\n\n%s\n\n%s", i, actual, expected)
}
t.Run(fmt.Sprintf("copy-%d", i), func(t *testing.T) {
actual := tc.F(tc.One.DeepCopy())
expected := tc.F(tc.Two)
if !reflect.DeepEqual(actual, expected) {
t.Fatalf("Bad: %d\n\n%s\n\n%s", i, actual, expected)
}
})
}
}

Expand Down
36 changes: 26 additions & 10 deletions vendor/github.com/mitchellh/reflectwalk/reflectwalk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -1474,8 +1474,8 @@
{
"checksumSHA1": "EDAtec3XSbTjw6gWG+NNScows9M=",
"path": "github.com/mitchellh/copystructure",
"revision": "8f3c396a26dadccbd29ee24c76c89166249cc16f",
"revisionTime": "2016-09-27T21:34:29Z"
"revision": "49a4444999946bce1882f9db0eb3ba0a44ed1fbb",
"revisionTime": "2016-09-28T02:49:35Z"
},
{
"path": "github.com/mitchellh/go-homedir",
Expand Down Expand Up @@ -1507,10 +1507,10 @@
"revision": "6e6954073784f7ee67b28f2d22749d6479151ed7"
},
{
"checksumSHA1": "5fFCVadmQVH6jqnB6Zd739s28QM=",
"checksumSHA1": "kXh6sdGViiRK0REpIWydJvpsyY0=",
"path": "github.com/mitchellh/reflectwalk",
"revision": "84fc159ad78a797bb094a1e0c364392d837e1cd8",
"revisionTime": "2016-09-28T02:14:22Z"
"revision": "0c9480f65513be815a88d6076a3d8d95d4274236",
"revisionTime": "2016-09-28T02:49:03Z"
},
{
"checksumSHA1": "/iig5lYSPCL3C8J7e4nTAevYNDE=",
Expand Down

0 comments on commit ea342b7

Please sign in to comment.