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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user