Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Commit

Permalink
elasticsearch: use cmp.Diff in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mccurdyc committed Jun 18, 2020
1 parent 412688e commit 6a2c1d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fastly/block_fastly_service_v1_logging_elasticsearch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package fastly
import (
"fmt"
"log"
"reflect"
"testing"

fst "github.com/fastly/go-fastly/fastly"
Expand Down Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 6a2c1d6

Please sign in to comment.