diff --git a/backend/webdav/webdav_internal_test.go b/backend/webdav/webdav_internal_test.go index 20dee468b..c2c2d1dfa 100644 --- a/backend/webdav/webdav_internal_test.go +++ b/backend/webdav/webdav_internal_test.go @@ -29,7 +29,7 @@ func prepareServer(t *testing.T) (configmap.Simple, func()) { what := fmt.Sprintf("%s %s: Header ", r.Method, r.URL.Path) assert.Equal(t, headers[1], r.Header.Get(headers[0]), what+headers[0]) assert.Equal(t, headers[3], r.Header.Get(headers[2]), what+headers[2]) - fmt.Fprintf(w, ` + _, err := fmt.Fprintf(w, ` /remote.php/webdav/ @@ -41,8 +41,8 @@ func prepareServer(t *testing.T) (configmap.Simple, func()) { `) + require.NoError(t, err) }) - // Make the test server ts := httptest.NewServer(handler) diff --git a/fs/config/configfile/configfile_test.go b/fs/config/configfile/configfile_test.go index 2c2ba7e27..8ec7cd518 100644 --- a/fs/config/configfile/configfile_test.go +++ b/fs/config/configfile/configfile_test.go @@ -190,7 +190,8 @@ func TestConfigFileReload(t *testing.T) { // Now write a new value on the end out, err := os.OpenFile(config.GetConfigPath(), os.O_APPEND|os.O_WRONLY, 0777) require.NoError(t, err) - fmt.Fprintln(out, "appended = what magic") + _, err = fmt.Fprintln(out, "appended = what magic") + require.NoError(t, err) require.NoError(t, out.Close()) // And check we magically reloaded it