diff --git a/libs/filer/dbfs_client_test.go b/libs/filer/dbfs_client_test.go index a95a9e4bc..7bf840958 100644 --- a/libs/filer/dbfs_client_test.go +++ b/libs/filer/dbfs_client_test.go @@ -55,8 +55,9 @@ func TestDbfsClientForSmallFiles(t *testing.T) { // write file to DBFS fd, err := os.Open(localPath) - defer fd.Close() require.NoError(t, err) + defer fd.Close() + err = dbfsClient.Write(context.Background(), "hello.txt", fd) require.NoError(t, err) @@ -115,8 +116,9 @@ func TestDbfsClientForLargerFiles(t *testing.T) { // write file to DBFS fd, err := os.Open(localPath) - defer fd.Close() require.NoError(t, err) + defer fd.Close() + err = dbfsClient.Write(context.Background(), "hello.txt", fd) require.NoError(t, err)