test: fix failed ut

This commit is contained in:
Aaron Liu
2023-05-27 10:44:28 +08:00
parent 89ee147961
commit b1344616b8
8 changed files with 21 additions and 40 deletions

View File

@@ -352,8 +352,6 @@ func TestFileSystem_GetSource(t *testing.T) {
sqlmock.NewRows([]string{"id", "type", "is_origin_link_enable"}).
AddRow(35, "local", true),
)
// 查找站点URL
mock.ExpectQuery("SELECT(.+)").WithArgs("siteURL").WillReturnRows(sqlmock.NewRows([]string{"id", "value"}).AddRow(1, "https://cloudreve.org"))
sourceURL, err := fs.GetSource(ctx, 2)
asserts.NoError(mock.ExpectationsWereMet())