Commit 5d6a474f authored by Steven Allen's avatar Steven Allen

tests: fix unused variable lints

parent a7d4a719
...@@ -296,7 +296,7 @@ func (tp *provider) TestObjectAddLinkCreate(t *testing.T) { ...@@ -296,7 +296,7 @@ func (tp *provider) TestObjectAddLinkCreate(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
p3, err := api.Object().AddLink(ctx, p2, "abc/d", p2) _, err = api.Object().AddLink(ctx, p2, "abc/d", p2)
if err == nil { if err == nil {
t.Fatal("expected an error") t.Fatal("expected an error")
} }
...@@ -304,7 +304,7 @@ func (tp *provider) TestObjectAddLinkCreate(t *testing.T) { ...@@ -304,7 +304,7 @@ func (tp *provider) TestObjectAddLinkCreate(t *testing.T) {
t.Fatalf("unexpected error: %s", err.Error()) t.Fatalf("unexpected error: %s", err.Error())
} }
p3, err = api.Object().AddLink(ctx, p2, "abc/d", p2, opt.Object.Create(true)) p3, err := api.Object().AddLink(ctx, p2, "abc/d", p2, opt.Object.Create(true))
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
...@@ -384,6 +384,9 @@ func (tp *provider) TestObjectAddData(t *testing.T) { ...@@ -384,6 +384,9 @@ func (tp *provider) TestObjectAddData(t *testing.T) {
} }
data, err := ioutil.ReadAll(r) data, err := ioutil.ReadAll(r)
if err != nil {
t.Fatal(err)
}
if string(data) != "foobar" { if string(data) != "foobar" {
t.Error("unexpected data") t.Error("unexpected data")
...@@ -414,6 +417,9 @@ func (tp *provider) TestObjectSetData(t *testing.T) { ...@@ -414,6 +417,9 @@ func (tp *provider) TestObjectSetData(t *testing.T) {
} }
data, err := ioutil.ReadAll(r) data, err := ioutil.ReadAll(r)
if err != nil {
t.Fatal(err)
}
if string(data) != "bar" { if string(data) != "bar" {
t.Error("unexpected data") t.Error("unexpected data")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment