Skip to content

Commit ba72cc9

Browse files
committed
removes testify
Signed-off-by: Owen Diehl <[email protected]>
1 parent b5fe917 commit ba72cc9

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

config/config_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ package config
1818
import (
1919
"encoding/json"
2020
"testing"
21-
22-
"github.com/stretchr/testify/require"
2321
)
2422

2523
func TestJSONMarshalSecret(t *testing.T) {
@@ -49,7 +47,9 @@ func TestJSONMarshalSecret(t *testing.T) {
4947
if err != nil {
5048
t.Fatal(err)
5149
}
52-
require.Equal(t, tc.expected, string(c), "Secret not properly elided.")
50+
if tc.expected != string(c) {
51+
t.Fatalf("Secret not marshaled correctly, got '%s'", string(c))
52+
}
5353
})
5454
}
5555
}

config/http_config_test.go

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import (
3737
"testing"
3838
"time"
3939

40-
"github.com/stretchr/testify/require"
4140
yaml "gopkg.in/yaml.v2"
4241
)
4342

@@ -1290,13 +1289,17 @@ func TestMarshalURL(t *testing.T) {
12901289
if err != nil {
12911290
t.Fatal(err)
12921291
}
1293-
require.Equal(t, "\"http://example.com/\"", string(c), "URL not properly marshaled in JSON.")
1292+
if string(c) != "\"http://example.com/\"" {
1293+
t.Fatalf("URL not properly marshaled in JSON got '%s'", string(c))
1294+
}
12941295

12951296
c, err = yaml.Marshal(u)
12961297
if err != nil {
12971298
t.Fatal(err)
12981299
}
1299-
require.Equal(t, "http://example.com/\n", string(c), "URL not properly marshaled in YAML.")
1300+
if string(c) != "http://example.com/\n" {
1301+
t.Fatalf("URL not properly marshaled in YAML got '%s'", string(c))
1302+
}
13001303
}
13011304

13021305
func TestUnmarshalURL(t *testing.T) {
@@ -1307,11 +1310,15 @@ func TestUnmarshalURL(t *testing.T) {
13071310
if err != nil {
13081311
t.Fatal(err)
13091312
}
1310-
require.Equal(t, "http://example.com/a%20b", u.String(), "URL not properly unmarshaled in JSON.")
1313+
if u.String() != "http://example.com/a%20b" {
1314+
t.Fatalf("URL not properly unmarshaled in JSON, got '%s'", u.String())
1315+
}
13111316

13121317
err = yaml.Unmarshal(b, &u)
13131318
if err != nil {
13141319
t.Fatal(err)
13151320
}
1316-
require.Equal(t, "http://example.com/a%20b", u.String(), "URL not properly unmarshaled in YAML.")
1321+
if u.String() != "http://example.com/a%20b" {
1322+
t.Fatalf("URL not properly unmarshaled in YAML, got '%s'", u.String())
1323+
}
13171324
}

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ require (
1212
github.com/prometheus/client_golang v1.7.1
1313
github.com/prometheus/client_model v0.2.0
1414
github.com/sirupsen/logrus v1.6.0
15-
github.com/stretchr/testify v1.7.0
1615
golang.org/x/net v0.0.0-20200625001655-4c5254603344
1716
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
1817
golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae

go.sum

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
261261
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
262262
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
263263
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
264+
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
264265
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
265-
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
266-
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
267266
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
268267
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
269268
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
@@ -410,8 +409,6 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
410409
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
411410
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
412411
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
413-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
414-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
415412
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
416413
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
417414
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

0 commit comments

Comments
 (0)