inbounds: allow custom monthly traffic reset days (#6071)

This commit is contained in:
Shichao Song
2026-07-29 05:27:09 +08:00
committed by GitHub
parent 34d2591e50
commit 17e6b5a460
37 changed files with 179 additions and 16 deletions
@@ -0,0 +1,18 @@
package service
import "testing"
func TestNormalizeTrafficResetDay(t *testing.T) {
tests := map[int]int{
0: 1,
1: 1,
15: 15,
31: 31,
32: 31,
}
for input, want := range tests {
if got := normalizeTrafficResetDay(input); got != want {
t.Errorf("normalizeTrafficResetDay(%d) = %d, want %d", input, got, want)
}
}
}