Pull request: home: fix migration, imp code

Updates .
Updates .

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:
Ainar Garipov 2021-03-24 17:17:44 +03:00
parent e10a3fa4b3
commit ba3fc242ab
2 changed files with 70 additions and 95 deletions
internal/home

View file

@ -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)