* bump mockery
Signed-off-by: wang yan <wangyan@vmware.com>
* update mock testing codes
Signed-off-by: wang yan <wangyan@vmware.com>
---------
Signed-off-by: wang yan <wangyan@vmware.com>
The packages feature in mockery is the new way for managing mocks, and
will be the only way to generate mocks in v3. see
https://vektra.github.io/mockery/v2.43/migrating_to_packages/.
1. Bump mockery to v2.43.2.
2. Switch the generation from old way to configuration yaml.
Signed-off-by: chlins <chlins.zhang@gmail.com>
1. Remove `common/quota` package.
2. Remove functions about quota in `common/dao` package.
3. Move `Quota` and `QuotaUsage` models from `common/models` to
`pkg/quota/dao`.
4. Add `Count` and `List` methods to `quota.Controller`.
5. Use `quota.Controller` to implement quota APIs.
Signed-off-by: He Weiwei <hweiwei@vmware.com>
1. Use quota controller to implement the internal quota APIs.
2. The internal quota APIs can exceed the quota limitations.
Signed-off-by: He Weiwei <hweiwei@vmware.com>