Skip to content

Commit

Permalink
Update exporters/otlp/internal/config_test.go
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
  • Loading branch information
hanyuancheung and MrAlias committed Feb 25, 2022
1 parent 0e7b6e8 commit cf86c84
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions exporters/otlp/internal/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,28 @@ func TestCleanPath(t *testing.T) {
},
want: "/https:/env_endpoint",
},
{
name: "spaces trimmed",
args: args{
URLPath: " /dir",
},
want: "/dir",
},
{
name: "clean path empty",
args: args{
URLPath: "dir/..",
defaultPath: "DefaultTracesPath",
},
want: "DefaultTracesPath",
},
{
name: "make absolute",
args: args{
URLPath: "dir/a",
},
want: "/dir/a",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit cf86c84

Please sign in to comment.