test/plugin/base_test.rb in fluent-plugin-google-cloud-0.12.8 vs test/plugin/base_test.rb in fluent-plugin-google-cloud-0.12.9
- old
+ new
@@ -19,10 +19,11 @@
require 'google/apis'
require 'helper'
require 'mocha/test_unit'
require 'prometheus/client'
require 'webmock/test_unit'
+require 'cgi'
require_relative 'asserts'
require_relative 'constants'
require_relative 'utils'
@@ -821,11 +822,11 @@
d.run
end
params = CONTAINER_FROM_METADATA_PARAMS.merge(
labels: CONTAINER_FROM_METADATA_PARAMS[:labels].merge(
"#{GKE_CONSTANTS[:service]}/container_name" =>
- URI.decode(encoded_name)),
+ CGI.unescape(encoded_name)),
log_name: encoded_name)
verify_log_entries(0, params, 'textPayload')
end
end
@@ -904,10 +905,10 @@
d.run
end
params = CONTAINER_FROM_METADATA_PARAMS.merge(
resource: CONTAINER_FROM_METADATA_PARAMS[:resource].merge(
labels: CONTAINER_FROM_METADATA_PARAMS[:resource][:labels].merge(
- 'container_name' => URI.decode(encoded_container_name))),
+ 'container_name' => CGI.unescape(encoded_container_name))),
log_name: encoded_container_name)
verify_log_entries(1, params, 'textPayload')
end
end