From c67d403d432355c849a99fc30ab172109c877594 Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Tue, 2 Aug 2016 09:59:29 -0700 Subject: [PATCH 1/2] Fix Ginkgo entries in Godeps.json. (#29402) --- Godeps/Godeps.json | 136 +++++++++--------- .../remote/syscall_dup_linux_arm64.go | 2 +- .../internal/remote/syscall_dup_solaris.go | 2 +- .../internal/remote/syscall_dup_unix.go | 2 +- vendor/github.com/onsi/gomega/.travis.yml | 3 +- .../github.com/onsi/gomega/format/format.go | 13 -- vendor/github.com/onsi/gomega/matchers.go | 9 ++ .../gomega/matchers/match_yaml_matcher.go | 74 ++++++++++ 8 files changed, 156 insertions(+), 85 deletions(-) create mode 100644 vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 642d97ebe5446..ec91ef731e7dd 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1473,173 +1473,173 @@ }, { "ImportPath": "github.com/onsi/ginkgo", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/config", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/ginkgo", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/ginkgo/convert", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/ginkgo/interrupthandler", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/ginkgo/nodot", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/ginkgo/testrunner", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/ginkgo/testsuite", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/ginkgo/watch", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/codelocation", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/containernode", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/failer", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/leafnodes", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/remote", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/spec", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/specrunner", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/suite", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/testingtproxy", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/internal/writer", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/reporters", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/reporters/stenographer", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/ginkgo/types", - "Comment": "v1.2.0-60-g7d32401", - "Rev": "7d3240191d7b2311b60090fcbc96e56bffc45ec0" + "Comment": "v1.2.0-66-g74c678d", + "Rev": "74c678d97c305753605c338c6c78c49ec104b5e7" }, { "ImportPath": "github.com/onsi/gomega", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/format", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/internal/assertion", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/internal/asyncassertion", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/internal/oraclematcher", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/internal/testingtsupport", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/matchers", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/bipartitegraph", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/edge", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/node", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/matchers/support/goraph/util", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/onsi/gomega/types", - "Comment": "v1.0-91-g7ce781e", - "Rev": "7ce781ea776b2fd506491011353bded2e40c8467" + "Comment": "v1.0-115-g9ed8da1", + "Rev": "9ed8da19f2156b87a803a8fdf6d126f627a12db1" }, { "ImportPath": "github.com/opencontainers/runc/libcontainer", diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go index 5c59728ea9b6d..9550d37b36be3 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go @@ -8,4 +8,4 @@ import "syscall" // use the nearly identical syscall.Dup3 instead func syscallDup(oldfd int, newfd int) (err error) { return syscall.Dup3(oldfd, newfd, 0) -} \ No newline at end of file +} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go index ecf9cafb66441..75ef7fb78e39d 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go @@ -6,4 +6,4 @@ import "golang.org/x/sys/unix" func syscallDup(oldfd int, newfd int) (err error) { return unix.Dup2(oldfd, newfd) -} \ No newline at end of file +} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go index cacdd0e6496eb..ef6255960071a 100644 --- a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go +++ b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go @@ -8,4 +8,4 @@ import "syscall" func syscallDup(oldfd int, newfd int) (err error) { return syscall.Dup2(oldfd, newfd) -} \ No newline at end of file +} diff --git a/vendor/github.com/onsi/gomega/.travis.yml b/vendor/github.com/onsi/gomega/.travis.yml index 3b26c7c0b3087..8ed1e44a77b88 100644 --- a/vendor/github.com/onsi/gomega/.travis.yml +++ b/vendor/github.com/onsi/gomega/.travis.yml @@ -1,7 +1,8 @@ language: go go: - 1.5 - - tip + - 1.6.2 + - stable install: - go get -v ./... diff --git a/vendor/github.com/onsi/gomega/format/format.go b/vendor/github.com/onsi/gomega/format/format.go index ec9c91a42f67f..226b8925dda4d 100644 --- a/vendor/github.com/onsi/gomega/format/format.go +++ b/vendor/github.com/onsi/gomega/format/format.go @@ -261,16 +261,3 @@ func isNilValue(a reflect.Value) bool { return false } - -func isNil(a interface{}) bool { - if a == nil { - return true - } - - switch reflect.TypeOf(a).Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return reflect.ValueOf(a).IsNil() - } - - return false -} diff --git a/vendor/github.com/onsi/gomega/matchers.go b/vendor/github.com/onsi/gomega/matchers.go index 12d2b967f5b79..0c30aa1c2c46d 100644 --- a/vendor/github.com/onsi/gomega/matchers.go +++ b/vendor/github.com/onsi/gomega/matchers.go @@ -214,6 +214,15 @@ func MatchJSON(json interface{}) types.GomegaMatcher { } } +//MatchYAML succeeds if actual is a string or stringer of YAML that matches +//the expected YAML. The YAML's are decoded and the resulting objects are compared via +//reflect.DeepEqual so things like key-ordering and whitespace shouldn't matter. +func MatchYAML(yaml interface{}) types.GomegaMatcher { + return &matchers.MatchYAMLMatcher{ + YAMLToMatch: yaml, + } +} + //BeEmpty succeeds if actual is empty. Actual must be of type string, array, map, chan, or slice. func BeEmpty() types.GomegaMatcher { return &matchers.BeEmptyMatcher{} diff --git a/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go new file mode 100644 index 0000000000000..69fb51a85929c --- /dev/null +++ b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go @@ -0,0 +1,74 @@ +package matchers + +import ( + "fmt" + "reflect" + "strings" + + "github.com/onsi/gomega/format" + "gopkg.in/yaml.v2" +) + +type MatchYAMLMatcher struct { + YAMLToMatch interface{} +} + +func (matcher *MatchYAMLMatcher) Match(actual interface{}) (success bool, err error) { + actualString, expectedString, err := matcher.toStrings(actual) + if err != nil { + return false, err + } + + var aval interface{} + var eval interface{} + + if err := yaml.Unmarshal([]byte(actualString), &aval); err != nil { + return false, fmt.Errorf("Actual '%s' should be valid YAML, but it is not.\nUnderlying error:%s", actualString, err) + } + if err := yaml.Unmarshal([]byte(expectedString), &eval); err != nil { + return false, fmt.Errorf("Expected '%s' should be valid YAML, but it is not.\nUnderlying error:%s", expectedString, err) + } + + return reflect.DeepEqual(aval, eval), nil +} + +func (matcher *MatchYAMLMatcher) FailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.toNormalisedStrings(actual) + return format.Message(actualString, "to match YAML of", expectedString) +} + +func (matcher *MatchYAMLMatcher) NegatedFailureMessage(actual interface{}) (message string) { + actualString, expectedString, _ := matcher.toNormalisedStrings(actual) + return format.Message(actualString, "not to match YAML of", expectedString) +} + +func (matcher *MatchYAMLMatcher) toNormalisedStrings(actual interface{}) (actualFormatted, expectedFormatted string, err error) { + actualString, expectedString, err := matcher.toStrings(actual) + return normalise(actualString), normalise(expectedString), err +} + +func normalise(input string) string { + var val interface{} + err := yaml.Unmarshal([]byte(input), &val) + if err != nil { + panic(err) // guarded by Match + } + output, err := yaml.Marshal(val) + if err != nil { + panic(err) // guarded by Unmarshal + } + return strings.TrimSpace(string(output)) +} + +func (matcher *MatchYAMLMatcher) toStrings(actual interface{}) (actualFormatted, expectedFormatted string, err error) { + actualString, ok := toString(actual) + if !ok { + return "", "", fmt.Errorf("MatchYAMLMatcher matcher requires a string, stringer, or []byte. Got actual:\n%s", format.Object(actual, 1)) + } + expectedString, ok := toString(matcher.YAMLToMatch) + if !ok { + return "", "", fmt.Errorf("MatchYAMLMatcher matcher requires a string, stringer, or []byte. Got expected:\n%s", format.Object(matcher.YAMLToMatch, 1)) + } + + return actualString, expectedString, nil +} From 06b67b19397b9753e9ee7678bbaedcde95611c81 Mon Sep 17 00:00:00 2001 From: Ryan Hitchman Date: Tue, 2 Aug 2016 10:06:23 -0700 Subject: [PATCH 2/2] Add missing .drone.sec file to make verify-godeps happy (#29402) --- vendor/github.com/vmware/govmomi/.drone.sec | 1 + 1 file changed, 1 insertion(+) create mode 100644 vendor/github.com/vmware/govmomi/.drone.sec diff --git a/vendor/github.com/vmware/govmomi/.drone.sec b/vendor/github.com/vmware/govmomi/.drone.sec new file mode 100644 index 0000000000000..ad52e59ac874e --- /dev/null +++ b/vendor/github.com/vmware/govmomi/.drone.sec @@ -0,0 +1 @@ +eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.kK6pryC8R-O1R0Gj9ydLvQuIZlcYLGze23WdW7xbpiEEKdz6nweJrMm7ysy8lgu1tM47JVo19p2_b26bNKSQshCUOETvd7Hb2UMZOjnyUnqdyAAyoi6UkIquXfUUbHTNS0iMxwSxxW9KMp2GXNq8-o6T8xQZTDirBJFKKd8ZNUasTaoa5j8U9IfdR1aCavTBuOhvk8IVs-jSbY5TVJMJiE0IOPXois7aRJ6uAiANQBk9VKLegEcZD_qAewecXHDsHi-u0jbmg3o3PPaJaK_Qv5dsPlR2M-E2kE3AGUn0-zn5zYRngoAZ8WZr2O4GvLdltJKq9i2z7jOrdOzzRcDRow.96qvwl_E1Hj15u7Q.hWs-jQ8FsqQFD7pE9N-UEP1BWQ9rsJIcCaPvQRIp8Fukm_vvlw9YEaEq0ERLrsUWsJWpd1ca8_h8x7xD6f_d5YppwRqRHIeGIsdBOTMhNs0lG8ikkQXLat-UroCpy8EC17nuUtDE2E2Kdxrk4Cdd6Bk-dKk0Ta4w3Ud0YBKa.P8zrO7xizgv0i98eVWWzEg \ No newline at end of file