Commit 24fb8cda authored by Andrew Newdigate's avatar Andrew Newdigate

Add test for URL encoded characters

Tracing URL templates should be able to include % characters. This test
is intended to show that the current implementation needs rework in
order to handle this requirement.
parent 48d31abc
...@@ -44,12 +44,13 @@ describe Gitlab::Tracing do ...@@ -44,12 +44,13 @@ describe Gitlab::Tracing do
describe '.tracing_url' do describe '.tracing_url' do
where(:tracing_url_enabled?, :tracing_url_template, :correlation_id, :process_name, :tracing_url) do where(:tracing_url_enabled?, :tracing_url_template, :correlation_id, :process_name, :tracing_url) do
false | "https://localhost" | "123" | "web" | nil false | "https://localhost" | "123" | "web" | nil
true | "https://localhost" | "123" | "web" | "https://localhost" true | "https://localhost" | "123" | "web" | "https://localhost"
true | "https://localhost?service=%{service}" | "123" | "web" | "https://localhost?service=web" true | "https://localhost?service=%{service}" | "123" | "web" | "https://localhost?service=web"
true | "https://localhost?c=%{correlation_id}" | "123" | "web" | "https://localhost?c=123" true | "https://localhost?c=%{correlation_id}" | "123" | "web" | "https://localhost?c=123"
true | "https://localhost?c=%{correlation_id}&s=%{service}" | "123" | "web" | "https://localhost?c=123&s=web" true | "https://localhost?c=%{correlation_id}&s=%{service}" | "123" | "web" | "https://localhost?c=123&s=web"
true | "https://localhost?c=%{correlation_id}" | nil | "web" | "https://localhost?c=" true | "https://localhost?c=%{correlation_id}" | nil | "web" | "https://localhost?c="
true | "https://localhost?c=%{correlation_id}&s=%22%{service}%22" | "123" | "web" | "https://localhost?c=123&s=%22web%22"
end end
with_them do with_them do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment