forked from mirror/client_golang
Fix staticcheck errors in push_test.go
Signed-off-by: beorn7 <beorn@soundcloud.com>
This commit is contained in:
parent
1749edba40
commit
91b385db44
|
@ -96,7 +96,7 @@ func TestPush(t *testing.T) {
|
||||||
if lastMethod != "PUT" {
|
if lastMethod != "PUT" {
|
||||||
t.Error("want method PUT for Push, got", lastMethod)
|
t.Error("want method PUT for Push, got", lastMethod)
|
||||||
}
|
}
|
||||||
if bytes.Compare(lastBody, wantBody) != 0 {
|
if !bytes.Equal(lastBody, wantBody) {
|
||||||
t.Errorf("got body %v, want %v", lastBody, wantBody)
|
t.Errorf("got body %v, want %v", lastBody, wantBody)
|
||||||
}
|
}
|
||||||
if lastPath != "/metrics/job/testjob" {
|
if lastPath != "/metrics/job/testjob" {
|
||||||
|
@ -113,7 +113,7 @@ func TestPush(t *testing.T) {
|
||||||
if lastMethod != "POST" {
|
if lastMethod != "POST" {
|
||||||
t.Error("want method POST for Add, got", lastMethod)
|
t.Error("want method POST for Add, got", lastMethod)
|
||||||
}
|
}
|
||||||
if bytes.Compare(lastBody, wantBody) != 0 {
|
if !bytes.Equal(lastBody, wantBody) {
|
||||||
t.Errorf("got body %v, want %v", lastBody, wantBody)
|
t.Errorf("got body %v, want %v", lastBody, wantBody)
|
||||||
}
|
}
|
||||||
if lastPath != "/metrics/job/testjob" {
|
if lastPath != "/metrics/job/testjob" {
|
||||||
|
@ -170,7 +170,7 @@ func TestPush(t *testing.T) {
|
||||||
if lastMethod != "PUT" {
|
if lastMethod != "PUT" {
|
||||||
t.Error("want method PUT for Push, got", lastMethod)
|
t.Error("want method PUT for Push, got", lastMethod)
|
||||||
}
|
}
|
||||||
if bytes.Compare(lastBody, wantBody) != 0 {
|
if !bytes.Equal(lastBody, wantBody) {
|
||||||
t.Errorf("got body %v, want %v", lastBody, wantBody)
|
t.Errorf("got body %v, want %v", lastBody, wantBody)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ func TestPush(t *testing.T) {
|
||||||
if lastMethod != "POST" {
|
if lastMethod != "POST" {
|
||||||
t.Error("want method POST for Add, got", lastMethod)
|
t.Error("want method POST for Add, got", lastMethod)
|
||||||
}
|
}
|
||||||
if bytes.Compare(lastBody, wantBody) != 0 {
|
if !bytes.Equal(lastBody, wantBody) {
|
||||||
t.Errorf("got body %v, want %v", lastBody, wantBody)
|
t.Errorf("got body %v, want %v", lastBody, wantBody)
|
||||||
}
|
}
|
||||||
if lastPath != "/metrics/job/testjob/a/x/b/y" && lastPath != "/metrics/job/testjob/b/y/a/x" {
|
if lastPath != "/metrics/job/testjob/a/x/b/y" && lastPath != "/metrics/job/testjob/b/y/a/x" {
|
||||||
|
|
Loading…
Reference in New Issue