lint: missing err check in test
This commit is contained in:
@@ -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"]
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user