lint: missing err check in test

This commit is contained in:
Umputun
2019-03-25 01:15:51 -05:00
parent 65738bc158
commit 2a64a71eb8
2 changed files with 4 additions and 2 deletions
@@ -523,6 +523,7 @@ func TestRest_SavePictureCtrl(t *testing.T) {
m := map[string]string{}
err = json.Unmarshal(body, &m)
assert.NoError(t, err)
assert.Contains(t, m["id"], ".png")
// load picture
@@ -577,6 +578,7 @@ func TestRest_CreateWithPictures(t *testing.T) {
require.Nil(t, err)
m := map[string]string{}
err = json.Unmarshal(body, &m)
assert.NoError(t, err)
assert.Contains(t, m["id"], ".png")
return m["id"]
}
+2 -2
View File
@@ -187,14 +187,14 @@ func TestFsStore_Cleanup(t *testing.T) {
assert.NotNil(t, err, "no file on staging anymore")
}
func prepareImageTest(t *testing.T) (svc FileSystem, teardown func()) {
func prepareImageTest(t *testing.T) (svc *FileSystem, teardown func()) {
loc, err := ioutil.TempDir("", "test_image_r42")
require.NoError(t, err, "failed to make temp dir")
staging, err := ioutil.TempDir("", "test_image_r42.staging")
require.NoError(t, err, "failed to make temp staging dir")
svc = FileSystem{
svc = &FileSystem{
Location: loc,
Staging: staging,
Partitions: 100,