Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2019-02-22 15:40:58 +0300
committerAndrew Newdigate <andrew@gitlab.com>2019-02-22 15:40:58 +0300
commit24fb8cdae01e1e378b271b434a23dca93110ca00 (patch)
tree8db43fbab199e5c19c7079c17b125c9d8eb1cb41 /spec/lib
parent48d31abc97528a36614b545f0b61fa14053ce4a8 (diff)
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.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/tracing_spec.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/lib/gitlab/tracing_spec.rb b/spec/lib/gitlab/tracing_spec.rb
index 2cddc895026..8902d5f44ec 100644
--- a/spec/lib/gitlab/tracing_spec.rb
+++ b/spec/lib/gitlab/tracing_spec.rb
@@ -44,12 +44,13 @@ describe Gitlab::Tracing do
describe '.tracing_url' do
where(:tracing_url_enabled?, :tracing_url_template, :correlation_id, :process_name, :tracing_url) do
- false | "https://localhost" | "123" | "web" | nil
- true | "https://localhost" | "123" | "web" | "https://localhost"
- 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}&s=%{service}" | "123" | "web" | "https://localhost?c=123&s=web"
- true | "https://localhost?c=%{correlation_id}" | nil | "web" | "https://localhost?c="
+ false | "https://localhost" | "123" | "web" | nil
+ true | "https://localhost" | "123" | "web" | "https://localhost"
+ 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}&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}&s=%22%{service}%22" | "123" | "web" | "https://localhost?c=123&s=%22web%22"
end
with_them do