mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-14 07:10:58 +00:00
chore: bump deps and modernize test loops
- release.yml: download-artifact v7 -> v8 - frontend: i18next 26.3.1 -> 26.3.2, qs 6.15.2 -> 6.15.3 - go.mod: consolidate indirect requires (go mod tidy) - tests: adopt Go 1.22 range-over-int loops
This commit is contained in:
@@ -367,7 +367,7 @@ func TestMonitorNilRecoverStaysBounded(t *testing.T) {
|
||||
|
||||
monitor := newWithClient(cfg, failingClient(), nil)
|
||||
|
||||
for i := 0; i < 5; i++ {
|
||||
for range 5 {
|
||||
recovered, _ := monitor.Step(context.Background())
|
||||
if recovered {
|
||||
t.Fatal("a nil recovery func must never report recovery")
|
||||
@@ -402,7 +402,7 @@ func TestMonitorFailuresCappedDuringCooldown(t *testing.T) {
|
||||
t.Fatal("expected recovery once the threshold is reached")
|
||||
}
|
||||
|
||||
for i := 0; i < 6; i++ {
|
||||
for range 6 {
|
||||
monitor.Step(context.Background())
|
||||
if monitor.failures > cfg.FailureThreshold {
|
||||
t.Fatalf("failures must never exceed threshold %d during cooldown, got %d", cfg.FailureThreshold, monitor.failures)
|
||||
|
||||
Reference in New Issue
Block a user