Pull request 2321: upd-go-deps
Merge in DNS/adguard-home from upd-go-deps to master Squashed commit of the following: commit 2c0b63da2ec8bbf19bc7dbb03c0166f6f9a5d822 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Dec 12 14:42:31 2024 +0300 all: upd go deps, tools
This commit is contained in:
@@ -521,7 +521,7 @@ func TestUpgradeSchema11to12(t *testing.T) {
|
||||
name string
|
||||
}{{
|
||||
ivl: 1,
|
||||
want: timeutil.Duration{Duration: timeutil.Day},
|
||||
want: timeutil.Duration(timeutil.Day),
|
||||
wantErr: "",
|
||||
name: "success",
|
||||
}, {
|
||||
@@ -604,7 +604,7 @@ func TestUpgradeSchema11to12(t *testing.T) {
|
||||
ivlVal, ok = ivl.(timeutil.Duration)
|
||||
require.True(t, ok)
|
||||
|
||||
assert.Equal(t, 90*24*time.Hour, ivlVal.Duration)
|
||||
assert.Equal(t, 90*24*time.Hour, time.Duration(ivlVal))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1055,12 +1055,12 @@ func TestUpgradeSchema19to20(t *testing.T) {
|
||||
name string
|
||||
}{{
|
||||
ivl: 1,
|
||||
want: timeutil.Duration{Duration: timeutil.Day},
|
||||
want: timeutil.Duration(timeutil.Day),
|
||||
wantErr: "",
|
||||
name: "success",
|
||||
}, {
|
||||
ivl: 0,
|
||||
want: timeutil.Duration{Duration: timeutil.Day},
|
||||
want: timeutil.Duration(timeutil.Day),
|
||||
wantErr: "",
|
||||
name: "success",
|
||||
}, {
|
||||
@@ -1143,7 +1143,7 @@ func TestUpgradeSchema19to20(t *testing.T) {
|
||||
ivlVal, ok = ivl.(timeutil.Duration)
|
||||
require.True(t, ok)
|
||||
|
||||
assert.Equal(t, 24*time.Hour, ivlVal.Duration)
|
||||
assert.Equal(t, 24*time.Hour, time.Duration(ivlVal))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ func migrateTo12(diskConf yobj) (err error) {
|
||||
qlogIvl = 90
|
||||
}
|
||||
|
||||
dns[field] = timeutil.Duration{Duration: time.Duration(qlogIvl) * timeutil.Day}
|
||||
dns[field] = timeutil.Duration(time.Duration(qlogIvl) * timeutil.Day)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ func migrateTo20(diskConf yobj) (err error) {
|
||||
ivl = 1
|
||||
}
|
||||
|
||||
stats[field] = timeutil.Duration{Duration: time.Duration(ivl) * timeutil.Day}
|
||||
stats[field] = timeutil.Duration(time.Duration(ivl) * timeutil.Day)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func migrateTo23(diskConf yobj) (err error) {
|
||||
|
||||
diskConf["http"] = yobj{
|
||||
"address": netip.AddrPortFrom(bindHostAddr, uint16(bindPort)).String(),
|
||||
"session_ttl": timeutil.Duration{Duration: time.Duration(sessionTTL) * time.Hour}.String(),
|
||||
"session_ttl": timeutil.Duration(time.Duration(sessionTTL) * time.Hour).String(),
|
||||
}
|
||||
|
||||
delete(diskConf, "bind_host")
|
||||
|
||||
Reference in New Issue
Block a user