Pull request: home: add bootstrap to mobileconfig, imp code

Updates #3568.

Squashed commit of the following:

commit ec342e6223e2b2efe9a8bf833d5406a44c6417e4
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Sep 13 15:16:07 2021 +0300

    home: imp tests

commit 67cd771e631938d3e8a5340315314210de796174
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Mon Sep 13 14:34:03 2021 +0300

    home: add bootstrap to mobileconfig, imp code
This commit is contained in:
Ainar Garipov
2021-09-13 16:00:36 +03:00
parent 8fdd789474
commit 424f20da98
13 changed files with 187 additions and 95 deletions

View File

@@ -60,7 +60,7 @@ func TestDuration_String(t *testing.T) {
}
// durationEncodingTester is a helper struct to simplify testing different
// Duration marshalling and unmarshalling cases.
// Duration marshalling and unmarshaling cases.
type durationEncodingTester struct {
PtrMap map[string]*Duration `json:"ptr_map" yaml:"ptr_map"`
PtrSlice []*Duration `json:"ptr_slice" yaml:"ptr_slice"`
@@ -104,7 +104,7 @@ const (
// Duration.
const defaultTestDur = time.Millisecond
// checkFields verifies m's fields. It expects the m to be unmarshalled from
// checkFields verifies m's fields. It expects the m to be unmarshaled from
// one of the constant strings above.
func (m *durationEncodingTester) checkFields(t *testing.T, d Duration) {
t.Run("pointers_map", func(t *testing.T) {