Skip to content

Commit 536718f

Browse files
sallyomclaude
andcommitted
test: add edge case tests for StripScheme
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: sallyom <somalley@redhat.com>
1 parent f3ddd39 commit 536718f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

pkg/common/common_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,21 @@ func TestStripScheme(t *testing.T) {
7474
input: "10.0.0.1:4317",
7575
expected: "10.0.0.1:4317",
7676
},
77+
{
78+
name: "schemeless with double slash",
79+
input: "//192.168.1.1:80",
80+
expected: "192.168.1.1:80",
81+
},
82+
{
83+
name: "uppercase scheme",
84+
input: "HTTP://localhost:4317",
85+
expected: "localhost:4317",
86+
},
87+
{
88+
name: "port only",
89+
input: ":9090",
90+
expected: ":9090",
91+
},
7792
}
7893

7994
for _, tt := range tests {

0 commit comments

Comments
 (0)