mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-05 07:22:54 +03:00
Pull request: 4223 home: cmd update
Merge in DNS/adguard-home from 4223-cmd-update to master Squashed commit of the following: commit ffda71246f37eaba0cb190840f1370ba65099d7c Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Tue Nov 15 16:32:10 2022 +0200 home: cmd update commit 9c4e1c33da78952a2b1477ac380a0cf042a8990f Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Tue Nov 15 13:51:33 2022 +0200 home: cmd update commit 6a564dc30771b3675e8861ca3befaaee15d83026 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Mon Nov 14 11:05:06 2022 +0200 all: docs commit a546bdbdb6f3f78c40908bc1864f2a1ae1c9071f Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Mon Nov 14 10:55:16 2022 +0200 home: cmd update commit cbbb594980d3d163fe0489494b0ddca5f679d6e6 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Mon Nov 14 10:16:09 2022 +0200 home: imp code commit 677f8a7ca0f47da0ac636e5bab9db24506cf5041 Author: Dimitry Kolyshev <dkolyshev@adguard.com> Date: Sun Nov 13 14:12:48 2022 +0200 home: cmd update
This commit is contained in:
parent
167b112511
commit
93882d6860
4 changed files with 66 additions and 0 deletions
internal/home
|
@ -103,6 +103,11 @@ func TestParseDisableUpdate(t *testing.T) {
|
|||
assert.True(t, testParseOK(t, "--no-check-update").disableUpdate, "--no-check-update is disable update")
|
||||
}
|
||||
|
||||
func TestParsePerformUpdate(t *testing.T) {
|
||||
assert.False(t, testParseOK(t).performUpdate, "empty is not perform update")
|
||||
assert.True(t, testParseOK(t, "--update").performUpdate, "--update is perform update")
|
||||
}
|
||||
|
||||
// TODO(e.burkov): Remove after v0.108.0.
|
||||
func TestParseDisableMemoryOptimization(t *testing.T) {
|
||||
o, eff, err := parseCmdOpts("", []string{"--no-mem-optimization"})
|
||||
|
@ -169,6 +174,10 @@ func TestOptsToArgs(t *testing.T) {
|
|||
name: "disable_update",
|
||||
args: []string{"--no-check-update"},
|
||||
opts: options{disableUpdate: true},
|
||||
}, {
|
||||
name: "perform_update",
|
||||
args: []string{"--update"},
|
||||
opts: options{performUpdate: true},
|
||||
}, {
|
||||
name: "control_action",
|
||||
args: []string{"-s", "run"},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue