1
0
Fork 0

Merge branch v2.11 into v3.4

This commit is contained in:
romain 2025-06-02 11:38:16 +02:00
commit bd4bfd8919
110 changed files with 493 additions and 494 deletions

View file

@ -16,31 +16,31 @@ func TestAddInContext(t *testing.T) {
}{
{
desc: "without provider information",
ctx: context.Background(),
ctx: t.Context(),
name: "test",
expected: "",
},
{
desc: "provider name embedded in element name",
ctx: context.Background(),
ctx: t.Context(),
name: "test@foo",
expected: "foo",
},
{
desc: "provider name in context",
ctx: context.WithValue(context.Background(), key, "foo"),
ctx: context.WithValue(t.Context(), key, "foo"),
name: "test",
expected: "foo",
},
{
desc: "provider name in context and different provider name embedded in element name",
ctx: context.WithValue(context.Background(), key, "foo"),
ctx: context.WithValue(t.Context(), key, "foo"),
name: "test@fii",
expected: "fii",
},
{
desc: "provider name in context and same provider name embedded in element name",
ctx: context.WithValue(context.Background(), key, "foo"),
ctx: context.WithValue(t.Context(), key, "foo"),
name: "test@foo",
expected: "foo",
},
@ -71,31 +71,31 @@ func TestGetQualifiedName(t *testing.T) {
}{
{
desc: "empty name",
ctx: context.Background(),
ctx: t.Context(),
name: "",
expected: "",
},
{
desc: "without provider",
ctx: context.Background(),
ctx: t.Context(),
name: "test",
expected: "test",
},
{
desc: "with explicit provider",
ctx: context.Background(),
ctx: t.Context(),
name: "test@foo",
expected: "test@foo",
},
{
desc: "with provider in context",
ctx: context.WithValue(context.Background(), key, "foo"),
ctx: context.WithValue(t.Context(), key, "foo"),
name: "test",
expected: "test@foo",
},
{
desc: "with provider in context and explicit name",
ctx: context.WithValue(context.Background(), key, "foo"),
ctx: context.WithValue(t.Context(), key, "foo"),
name: "test@fii",
expected: "test@fii",
},