summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/hashicorp/go-multierror/multierror_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-04-16 05:37:14 -0700
committerJoram Wilander <jwawilander@gmail.com>2018-04-16 08:37:14 -0400
commit6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch)
tree3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/github.com/hashicorp/go-multierror/multierror_test.go
parentbf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff)
downloadchat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/github.com/hashicorp/go-multierror/multierror_test.go')
-rw-r--r--vendor/github.com/hashicorp/go-multierror/multierror_test.go70
1 files changed, 0 insertions, 70 deletions
diff --git a/vendor/github.com/hashicorp/go-multierror/multierror_test.go b/vendor/github.com/hashicorp/go-multierror/multierror_test.go
deleted file mode 100644
index 5567d1c2d..000000000
--- a/vendor/github.com/hashicorp/go-multierror/multierror_test.go
+++ /dev/null
@@ -1,70 +0,0 @@
-package multierror
-
-import (
- "errors"
- "reflect"
- "testing"
-)
-
-func TestError_Impl(t *testing.T) {
- var _ error = new(Error)
-}
-
-func TestErrorError_custom(t *testing.T) {
- errors := []error{
- errors.New("foo"),
- errors.New("bar"),
- }
-
- fn := func(es []error) string {
- return "foo"
- }
-
- multi := &Error{Errors: errors, ErrorFormat: fn}
- if multi.Error() != "foo" {
- t.Fatalf("bad: %s", multi.Error())
- }
-}
-
-func TestErrorError_default(t *testing.T) {
- expected := `2 errors occurred:
-
-* foo
-* bar`
-
- errors := []error{
- errors.New("foo"),
- errors.New("bar"),
- }
-
- multi := &Error{Errors: errors}
- if multi.Error() != expected {
- t.Fatalf("bad: %s", multi.Error())
- }
-}
-
-func TestErrorErrorOrNil(t *testing.T) {
- err := new(Error)
- if err.ErrorOrNil() != nil {
- t.Fatalf("bad: %#v", err.ErrorOrNil())
- }
-
- err.Errors = []error{errors.New("foo")}
- if v := err.ErrorOrNil(); v == nil {
- t.Fatal("should not be nil")
- } else if !reflect.DeepEqual(v, err) {
- t.Fatalf("bad: %#v", v)
- }
-}
-
-func TestErrorWrappedErrors(t *testing.T) {
- errors := []error{
- errors.New("foo"),
- errors.New("bar"),
- }
-
- multi := &Error{Errors: errors}
- if !reflect.DeepEqual(multi.Errors, multi.WrappedErrors()) {
- t.Fatalf("bad: %s", multi.WrappedErrors())
- }
-}