mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Covered a test in utils/mapstorage_test.go
This commit is contained in:
committed by
Dan Christian Bogos
parent
71488c6ab8
commit
fab41e1d5d
@@ -136,6 +136,28 @@ func TestNavMapAdd2(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCloneMapStorage(t *testing.T) {
|
||||
expected := MapStorage{
|
||||
"FirstLevel": map[string]interface{}{
|
||||
"SecondLevel": map[string]interface{}{
|
||||
"ThirdLevel": map[string]interface{}{
|
||||
"Fld1": "Val1",
|
||||
},
|
||||
},
|
||||
},
|
||||
"FistLever2": map[string]interface{}{
|
||||
"SecondLevel2": map[string]interface{}{
|
||||
"Field2": "Value2",
|
||||
},
|
||||
"Field3": "Value3",
|
||||
},
|
||||
"Field4": "Val4",
|
||||
}
|
||||
if received := expected.Clone(); !reflect.DeepEqual(received, expected) {
|
||||
t.Errorf("Expected %+v \n, received %+v", ToJSON(expected), ToJSON(received))
|
||||
}
|
||||
}
|
||||
|
||||
func TestNavMapString(t *testing.T) {
|
||||
myData := map[string]interface{}{
|
||||
"FirstLevel": map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user