1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00
Files
glusterd2/pkg/utils/maps_test.go
Madhu Rajanna b45382e877 pkg:utils unit test
added unit test for pkgs/utils

Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
2018-04-26 15:46:30 +05:30

36 lines
512 B
Go

package utils
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestMergeStringMaps(t *testing.T) {
map1 := map[string]string{
"a": "a",
"b": "b",
"c": "c",
"d": "d",
}
map2 := map[string]string{
"a": "a",
"b": "b",
"c": "c",
"d": "d",
}
mergedmap := MergeStringMaps(map1, map2)
assert.Equal(t, mergedmap, map1)
map2 = map[string]string{
"e": "e",
"f": "f",
"g": "g",
"h": "h",
}
mergedmap = MergeStringMaps(map1, map2)
assert.Equal(t, len(mergedmap), 8)
}