From 564e2e1c0cc484f9709a3d0936021eb962ec0111 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Thu, 16 Sep 2021 20:07:15 +0300 Subject: [PATCH] Fix test --- config/attributescfg.go | 4 +--- config/attributescfg_test.go | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config/attributescfg.go b/config/attributescfg.go index 6c386e4ca..51630fc2c 100644 --- a/config/attributescfg.go +++ b/config/attributescfg.go @@ -149,9 +149,7 @@ func (alS AttributeSCfg) Clone() (cln *AttributeSCfg) { Enabled: alS.Enabled, IndexedSelects: alS.IndexedSelects, NestedFields: alS.NestedFields, - } - if alS.Opts != nil { - cln.Opts = alS.Opts.Clone() + Opts: alS.Opts.Clone(), } if alS.ResourceSConns != nil { cln.ResourceSConns = utils.CloneStringSlice(alS.ResourceSConns) diff --git a/config/attributescfg_test.go b/config/attributescfg_test.go index 6f91d8ddd..e25f1d4ba 100644 --- a/config/attributescfg_test.go +++ b/config/attributescfg_test.go @@ -167,6 +167,7 @@ func TestAttributeSCfgClone(t *testing.T) { PrefixIndexedFields: &[]string{"*req.index1", "*req.index2"}, SuffixIndexedFields: &[]string{"*req.index1"}, NestedFields: true, + Opts: &AttributesOpts{}, } rcv := ban.Clone() if !reflect.DeepEqual(ban, rcv) {