diff --git a/test/processes/test_file_permissions.rb b/test/processes/test_file_permissions.rb index 666102cc1..596b18fd2 100644 --- a/test/processes/test_file_permissions.rb +++ b/test/processes/test_file_permissions.rb @@ -49,7 +49,7 @@ def test_etc_perp_uninstalled_service_dir end def test_etc_perp_disabled_service_dir - stat = File.stat(File.join($config["etc_dir"], "perp", "opensearch-aws-signing-proxy")) + stat = File.stat(File.join($config["etc_dir"], "perp", "geoip-auto-updater")) assert_equal("40750", stat.mode.to_s(8)) assert_process_owner(stat) assert_group(stat) diff --git a/test/proxy/test_host_realip.rb b/test/proxy/logging/test_host_realip.rb similarity index 98% rename from test/proxy/test_host_realip.rb rename to test/proxy/logging/test_host_realip.rb index f3348315d..dadba8ad8 100644 --- a/test/proxy/test_host_realip.rb +++ b/test/proxy/logging/test_host_realip.rb @@ -1,4 +1,4 @@ -require_relative "../test_helper" +require_relative "../../test_helper" class Test::Proxy::Logging::TestHostRealip < Minitest::Test include ApiUmbrellaTestHelpers::Setup diff --git a/test/proxy/logging/test_special_chars.rb b/test/proxy/logging/test_special_chars.rb index 99a45a692..22a2d466a 100644 --- a/test/proxy/logging/test_special_chars.rb +++ b/test/proxy/logging/test_special_chars.rb @@ -107,6 +107,8 @@ def test_valid_utf8_encoding_in_url_path_url_params_headers end def test_invalid_utf8_encoding_in_url_path_url_params_headers + log_tail = LogTail.new("fluent-bit/current") + # Test various encodings of the ISO-8859-1 pound symbol: £ (but since this # is the ISO-8859-1 version, it's not valid UTF-8). url_encoded = "%A3" @@ -125,12 +127,15 @@ def test_invalid_utf8_encoding_in_url_path_url_params_headers record = wait_for_log(response)[:hit_source] + log = log_tail.read.encode("UTF-8", invalid: :replace) + assert_match("invalid UTF-8 bytes found, skipping bytes", log) + # Since the encoding of this string wasn't actually a valid UTF-8 string, # we test situations where it's sent as the raw ISO-8859-1 value, as well # as the UTF-8 replacement character. expected_raw_in_url_path = url_encoded.downcase expected_raw_in_url_query = url_encoded - expected_raw_in_header = " " + expected_raw_in_header = "" expected_raw_utf8_in_url_path = "%ef%bf%bd" expected_raw_utf8_in_url_query = "%EF%BF%BD" expected_raw_utf8_in_header = Base64.decode64("77+9").force_encoding("utf-8")