Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[otlpexporter] support validation for dns:https:// and dns:https:/// #10450

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update test
Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten committed Jun 20, 2024
commit f00600daa59a82e649ff736c6ff85b216a1c61a0
4 changes: 2 additions & 2 deletions exporter/otlpexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ func TestValidDNSEndpoint(t *testing.T) {
func TestSanitizeEndpoint(t *testing.T) {
codeboten marked this conversation as resolved.
Show resolved Hide resolved
factory := NewFactory()
cfg := factory.CreateDefaultConfig().(*Config)
cfg.Endpoint = "dns:https://backend.example.com:4317"
assert.Equal(t, "backend.example.com:4317", cfg.sanitizedEndpoint())
cfg.Endpoint = "dns:https://authority/backend.example.com:4317"
assert.Equal(t, "authority/backend.example.com:4317", cfg.sanitizedEndpoint())
cfg.Endpoint = "dns:https:///backend.example.com:4317"
assert.Equal(t, "backend.example.com:4317", cfg.sanitizedEndpoint())
cfg.Endpoint = "dns:https:////backend.example.com:4317"
Expand Down
Loading