Feat: file download in service level

This commit is contained in:
HFO4
2019-11-26 20:59:57 +08:00
parent a734493b65
commit 4156a71adf
10 changed files with 99 additions and 30 deletions

View File

@@ -21,7 +21,7 @@ func TestFileSystem_IsFileExist(t *testing.T) {
mock.ExpectQuery("SELECT(.+)").WithArgs(uint(1), "/s", "1.txt").WillReturnRows(
sqlmock.NewRows([]string{"Name"}).AddRow("s"),
)
testResult := fs.IsFileExist("/s/1.txt")
testResult, _ := fs.IsFileExist("/s/1.txt")
asserts.True(testResult)
asserts.NoError(mock.ExpectationsWereMet())
@@ -29,7 +29,7 @@ func TestFileSystem_IsFileExist(t *testing.T) {
mock.ExpectQuery("SELECT(.+)").WithArgs(uint(1), "/ss/dfsd", "1.txt").WillReturnRows(
sqlmock.NewRows([]string{"Name"}),
)
testResult = fs.IsFileExist("/ss/dfsd/1.txt")
testResult, _ = fs.IsFileExist("/ss/dfsd/1.txt")
asserts.False(testResult)
asserts.NoError(mock.ExpectationsWereMet())
}