mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2025-05-04 06:52:54 +03:00
Pull request: home: fix migration, imp code
Updates #1401. Updates #2646. Squashed commit of the following: commit 93b025a2184a72283e22748fecfc478fa549c922 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 24 16:41:07 2021 +0300 home: fix migration, imp code
This commit is contained in:
parent
e10a3fa4b3
commit
ba3fc242ab
2 changed files with 70 additions and 95 deletions
internal/home
|
@ -12,7 +12,7 @@ import (
|
|||
func TestUpgradeSchema1to2(t *testing.T) {
|
||||
diskConf := testDiskConf(1)
|
||||
|
||||
err := upgradeSchema1to2(&diskConf)
|
||||
err := upgradeSchema1to2(diskConf)
|
||||
require.Nil(t, err)
|
||||
|
||||
require.Equal(t, diskConf["schema_version"], 2)
|
||||
|
@ -35,7 +35,7 @@ func TestUpgradeSchema1to2(t *testing.T) {
|
|||
func TestUpgradeSchema2to3(t *testing.T) {
|
||||
diskConf := testDiskConf(2)
|
||||
|
||||
err := upgradeSchema2to3(&diskConf)
|
||||
err := upgradeSchema2to3(diskConf)
|
||||
require.Nil(t, err)
|
||||
|
||||
require.Equal(t, diskConf["schema_version"], 3)
|
||||
|
@ -73,7 +73,7 @@ func TestUpgradeSchema7to8(t *testing.T) {
|
|||
"schema_version": 7,
|
||||
}
|
||||
|
||||
err := upgradeSchema7to8(&oldConf)
|
||||
err := upgradeSchema7to8(oldConf)
|
||||
require.Nil(t, err)
|
||||
|
||||
require.Equal(t, oldConf["schema_version"], 8)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue