diff options
Diffstat (limited to 'config/defaultConfigProvider_test.go')
-rw-r--r-- | config/defaultConfigProvider_test.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config/defaultConfigProvider_test.go b/config/defaultConfigProvider_test.go index 6752ab2e5..7ab8c049a 100644 --- a/config/defaultConfigProvider_test.go +++ b/config/defaultConfigProvider_test.go @@ -283,6 +283,26 @@ func TestDefaultConfigProvider(t *testing.T) { }) + // Issue #8701 + c.Run("Prevent _merge only maps", func(c *qt.C) { + cfg := New() + + cfg.Set("", map[string]interface{}{ + "B": "bv", + }) + + cfg.Merge("", map[string]interface{}{ + "c": map[string]interface{}{ + "_merge": "shallow", + "d": "dv2", + }, + }) + + c.Assert(cfg.Get(""), qt.DeepEquals, maps.Params{ + "b": "bv", + }) + }) + c.Run("IsSet", func(c *qt.C) { cfg := New() |