From 31ac3336d956d93abede6db76453730613e1f076 Mon Sep 17 00:00:00 2001 From: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Date: Tue, 28 May 2024 12:58:08 -0600 Subject: [PATCH] [confmap] Add new tests (#10246) #### Description Add a new test scenarios to confmap expand tests #### Link to tracking issue Related to https://github.com/open-telemetry/opentelemetry-collector/pull/10182#discussion_r1617668532 --- confmap/expand_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/confmap/expand_test.go b/confmap/expand_test.go index 984a96a2995..02db3ea818d 100644 --- a/confmap/expand_test.go +++ b/confmap/expand_test.go @@ -283,6 +283,16 @@ func TestResolverExpandStringValues(t *testing.T) { input: "${env:HOST${env:PORT}?os=${env:OS&pr=${env:PR}", output: "${env:HOST3044?os=${env:OS&pr=amd", }, + { + name: "SchemeAfterNoSchemeIsExpanded", + input: "${HOST}${env:PORT}", + output: "${HOST}3044", + }, + { + name: "SchemeBeforeNoSchemeIsExpanded", + input: "${env:HOST}${PORT}", + output: "localhost${PORT}", + }, } for _, tt := range tests {