trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] 05/07: Following catch test naming standards.
Date Tue, 10 Dec 2019 23:02:31 GMT
This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 13dd05e1043c5f71846496549090aa748da972ae
Author: bneradt <bneradt@verizonmedia.com>
AuthorDate: Sat Nov 23 22:28:46 2019 +0000

    Following catch test naming standards.
    
    (cherry picked from commit a33b43e5471e927efcba482dae1c3839dee8d693)
---
 proxy/logging/LogConfig.cc                 | 3 +--
 proxy/logging/unit-tests/test_LogUtils2.cc | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc
index 816206d..77e8926 100644
--- a/proxy/logging/LogConfig.cc
+++ b/proxy/logging/LogConfig.cc
@@ -616,8 +616,7 @@ LogConfig::update_space_used()
         //
         // then check if the candidate belongs to any given log type
         //
-        std::string_view rolled_filename(entry->d_name, strlen(entry->d_name));
-        auto iter = deleting_info.find(LogUtils::get_unrolled_filename(rolled_filename));
+        auto iter = deleting_info.find(LogUtils::get_unrolled_filename(entry->d_name));
         if (iter == deleting_info.end()) {
           // We won't delete the log if its name doesn't match any give type.
           continue;
diff --git a/proxy/logging/unit-tests/test_LogUtils2.cc b/proxy/logging/unit-tests/test_LogUtils2.cc
index 70ccf6f..d50a89b 100644
--- a/proxy/logging/unit-tests/test_LogUtils2.cc
+++ b/proxy/logging/unit-tests/test_LogUtils2.cc
@@ -131,7 +131,7 @@ RecSignalManager(int, char const *, std::size_t)
 {
 }
 
-TEST_CASE("LogUtilsUnrolled", "get_unrolled_filename")
+TEST_CASE("get_unrolled_filename parses possible log files as expected", "[get_unrolled_filename]")
 {
   // Rolled log inputs.
   constexpr ts::TextView with_underscore = "squid.log_some.hostname.com.20191029.18h15m02s-20191029.18h30m02s.old";


Mime
View raw message