diff --git a/stream/mts/meta_test.go b/stream/mts/meta_test.go index 3b0662c9..e5ae04e6 100644 --- a/stream/mts/meta_test.go +++ b/stream/mts/meta_test.go @@ -28,6 +28,7 @@ LICENSE package mts import ( + "reflect" "testing" ) @@ -66,6 +67,22 @@ func TestUpdate(t *testing.T) { } } +func TestAll(t *testing.T) { + meta := NewMeta() + tstMap := map[string]string{ + "loc": "a,b,c", + "ts": "12345678", + } + + meta.Add("loc", "a,b,c") + meta.Add("ts", "12345678") + metaMap := meta.All() + + if !reflect.DeepEqual(metaMap, tstMap) { + t.Errorf("Map not correct. Got: %v, want: %v", metaMap, tstMap) + } +} + // TODO: test all // TODO: test get when key exists // TODO: test get when key doesn't exist