feat: tps limit for OneDrive policy

This commit is contained in:
HFO4
2022-06-09 16:11:36 +08:00
parent 4859ea6ee5
commit f083d52e17
9 changed files with 170 additions and 13 deletions

View File

@ -52,6 +52,9 @@ func TestUserStorageCalibration_Run(t *testing.T) {
mock.ExpectQuery("SELECT(.+)files(.+)").
WithArgs(1).
WillReturnRows(sqlmock.NewRows([]string{"total"}).AddRow(10))
mock.ExpectBegin()
mock.ExpectExec("UPDATE(.+)").WillReturnResult(sqlmock.NewResult(1, 1))
mock.ExpectCommit()
script.Run(context.Background())
asserts.NoError(mock.ExpectationsWereMet())
}