Copy metadata

This commit is contained in:
Asim Aslam
2019-01-17 09:40:49 +00:00
parent 7b89b36e37
commit 617db003d4
3 changed files with 27 additions and 8 deletions

View File

@@ -5,6 +5,21 @@ import (
"testing"
)
func TestMetadataCopy(t *testing.T) {
md := Metadata{
"foo": "bar",
"bar": "baz",
}
cp := Copy(md)
for k, v := range md {
if cv := cp[k]; cv != v {
t.Fatalf("Got %s:%s for %s:%s", k, cv, k, v)
}
}
}
func TestMetadataContext(t *testing.T) {
md := Metadata{
"foo": "bar",