From c6f55368eacdbdd1dc15e1b56076effd36247f9c Mon Sep 17 00:00:00 2001 From: Daniel Moran Date: Thu, 29 Jul 2021 12:16:23 -0400 Subject: [PATCH] test: remove go-cmp dependency (#213) --- clients/bucket_schema/create_test.go | 3 +-- clients/bucket_schema/update_test.go | 9 ++++----- go.mod | 1 - go.sum | 2 -- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/clients/bucket_schema/create_test.go b/clients/bucket_schema/create_test.go index 5a86391..9965f2f 100644 --- a/clients/bucket_schema/create_test.go +++ b/clients/bucket_schema/create_test.go @@ -11,7 +11,6 @@ import ( "time" "github.com/golang/mock/gomock" - "github.com/google/go-cmp/cmp" "github.com/influxdata/influx-cli/v2/api" "github.com/influxdata/influx-cli/v2/clients" "github.com/influxdata/influx-cli/v2/clients/bucket_schema" @@ -132,7 +131,7 @@ func TestClient_Create(t *testing.T) { a.schemas.EXPECT(). CreateMeasurementSchemaExecute(tmock.MatchedBy(func(in api.ApiCreateMeasurementSchemaRequest) bool { orgIDPtr := orgID.String() - return cmp.Equal(in.GetOrgID(), &orgIDPtr) && cmp.Equal(in.GetBucketID(), bucketID.String()) + return assert.Equal(t, in.GetOrgID(), &orgIDPtr) && assert.Equal(t, in.GetBucketID(), bucketID.String()) })). Return(api.MeasurementSchema{ Id: measurementID.String(), diff --git a/clients/bucket_schema/update_test.go b/clients/bucket_schema/update_test.go index 42de6f2..3b94b08 100644 --- a/clients/bucket_schema/update_test.go +++ b/clients/bucket_schema/update_test.go @@ -11,7 +11,6 @@ import ( "time" "github.com/golang/mock/gomock" - "github.com/google/go-cmp/cmp" "github.com/influxdata/influx-cli/v2/api" "github.com/influxdata/influx-cli/v2/clients" "github.com/influxdata/influx-cli/v2/clients/bucket_schema" @@ -163,10 +162,10 @@ func TestClient_Update(t *testing.T) { a.schemas.EXPECT(). UpdateMeasurementSchemaExecute(tmock.MatchedBy(func(in api.ApiUpdateMeasurementSchemaRequest) bool { orgIDPtr := orgID.String() - return cmp.Equal(in.GetOrgID(), &orgIDPtr) && - cmp.Equal(in.GetBucketID(), bucketID.String()) && - cmp.Equal(in.GetMeasurementID(), measurementID.String()) && - cmp.Equal(in.GetMeasurementSchemaUpdateRequest().Columns, a.cols) + return assert.Equal(t, in.GetOrgID(), &orgIDPtr) && + assert.Equal(t, in.GetBucketID(), bucketID.String()) && + assert.Equal(t, in.GetMeasurementID(), measurementID.String()) && + assert.Equal(t, in.GetMeasurementSchemaUpdateRequest().Columns, a.cols) })). Return(api.MeasurementSchema{ Id: measurementID.String(), diff --git a/go.mod b/go.mod index 412e6a8..e0503f3 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/gocarina/gocsv v0.0.0-20210408192840-02d7211d929d github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.5.0 - github.com/google/go-cmp v0.5.5 github.com/google/go-jsonnet v0.17.0 github.com/mattn/go-isatty v0.0.13 github.com/olekukonko/tablewriter v0.0.5 diff --git a/go.sum b/go.sum index f694eff..c02183f 100644 --- a/go.sum +++ b/go.sum @@ -25,8 +25,6 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-jsonnet v0.17.0 h1:/9NIEfhK1NQRKl3sP2536b2+x5HnZMdql7x3yK/l8JY= github.com/google/go-jsonnet v0.17.0/go.mod h1:sOcuej3UW1vpPTZOr8L7RQimqai1a57bt5j22LzGZCw= github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 h1:WlZsjVhE8Af9IcZDGgJGQpNflI3+MJSBhsgT5PCtzBQ=