将带宽限制改为流量限制

This commit is contained in:
GoEdgeLab
2021-11-09 17:36:54 +08:00
parent 36ce7f0acd
commit ab1686bca5
7 changed files with 169 additions and 152 deletions

View File

@@ -164,7 +164,7 @@ func TestServerDAO_FindAllEnabledServersWithDomain(t *testing.T) {
}
}
func TestServerDAO_UpdateServerBandwidthLimitStatus(t *testing.T) {
func TestServerDAO_UpdateServerTrafficLimitStatus(t *testing.T) {
dbs.NotifyReady()
var tx *dbs.Tx
@@ -172,7 +172,7 @@ func TestServerDAO_UpdateServerBandwidthLimitStatus(t *testing.T) {
defer func() {
t.Log(time.Since(before).Seconds()*1000, "ms")
}()
err := NewServerDAO().UpdateServerBandwidthLimitStatus(tx, &serverconfigs.BandwidthLimitConfig{
err := NewServerDAO().UpdateServerTrafficLimitStatus(tx, &serverconfigs.TrafficLimitConfig{
IsOn: true,
DailySize: &shared.SizeCapacity{Count: 1, Unit: "mb"},
MonthlySize: &shared.SizeCapacity{Count: 10, Unit: "mb"},