metadata: sync with grpc
Some checks failed
coverage / build (push) Failing after 41s
test / test (push) Successful in 2m31s
sync / sync (push) Successful in 46s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2025-04-29 23:13:57 +03:00
parent 7ff7a3dbe0
commit e4ee705eb2
2 changed files with 11 additions and 25 deletions

View File

@@ -5,6 +5,15 @@ import (
"testing"
)
func TesSet(t *testing.T) {
md := Pairs("key1", "val1", "key2", "val2")
md.Set("key1", "val2", "val3")
v := md.GetJoined("X-Request-Id")
if v != "val2, val3" {
t.Fatal("set not works")
}
}
/*
func TestAppendOutgoingContextModify(t *testing.T) {
md := Pairs("key1", "val1")
@@ -47,18 +56,6 @@ func TestMultipleUsage(t *testing.T) {
_ = omd
}
func TestMetadataSetMultiple(t *testing.T) {
md := New(4)
md.Set("key1", "val1", "key2", "val2")
if v := md.GetJoined("key1"); v != "val1" {
t.Fatalf("invalid kv %#+v", md)
}
if v := md.GetJoined("key2"); v != "val2" {
t.Fatalf("invalid kv %#+v", md)
}
}
func TestPairs(t *testing.T) {
md := Pairs("key1", "val1", "key2", "val2")
if v := md.Get("key1"); v == nil {