From 6a2c1d60c0847f4276acc3127810e209131f6ac3 Mon Sep 17 00:00:00 2001 From: "Colton J. McCurdy" Date: Thu, 18 Jun 2020 13:17:33 -0400 Subject: [PATCH] elasticsearch: use cmp.Diff in test --- fastly/block_fastly_service_v1_logging_elasticsearch_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fastly/block_fastly_service_v1_logging_elasticsearch_test.go b/fastly/block_fastly_service_v1_logging_elasticsearch_test.go index 3d8a433ee..958e6e640 100644 --- a/fastly/block_fastly_service_v1_logging_elasticsearch_test.go +++ b/fastly/block_fastly_service_v1_logging_elasticsearch_test.go @@ -3,7 +3,6 @@ package fastly import ( "fmt" "log" - "reflect" "testing" fst "github.com/fastly/go-fastly/fastly" @@ -65,8 +64,8 @@ func TestResourceFastlyFlattenElasticsearch(t *testing.T) { for _, c := range cases { out := flattenElasticsearch(c.remote) - if !reflect.DeepEqual(out, c.local) { - t.Fatalf("Error matching:\nexpected: %#v\n got: %#v", c.local, out) + if diff := cmp.Diff(out, c.local); diff != "" { + t.Fatalf("Error matching: %s", diff) } } }