[trafficserver] branch master updated: Add member initialization to the Errata class. (#7132)

2020-08-21 Thread amc
This is an automated email from the ASF dual-hosted git repository.

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
 new c75c654  Add member initialization to the Errata class. (#7132)
c75c654 is described below

commit c75c6549fb0c64d04c36ffdfd9dae37c2111c5b3
Author: Damian Meden 
AuthorDate: Fri Aug 21 17:01:55 2020 +0100

Add member initialization to the Errata class. (#7132)

Co-authored-by: Damian Meden 
---
 include/tscore/Errata.h  |  4 +--
 src/tscore/Makefile.am   |  3 +-
 src/tscore/unit_tests/test_Errata.cc | 60 
 3 files changed, 64 insertions(+), 3 deletions(-)

diff --git a/include/tscore/Errata.h b/include/tscore/Errata.h
index b28a291..758d218 100644
--- a/include/tscore/Errata.h
+++ b/include/tscore/Errata.h
@@ -728,8 +728,8 @@ MakeRv(R const , ///< The function result
 /* --- */
 // Inline methods.
 inline Errata::Message::Message(std::string const ) : m_text(text) {}
-inline Errata::Message::Message(Id id, std::string const ) : m_text(text) 
{}
-inline Errata::Message::Message(Id id, Code code, std::string const ) : 
m_text(text) {}
+inline Errata::Message::Message(Id id, std::string const ) : m_id(id), 
m_text(text) {}
+inline Errata::Message::Message(Id id, Code code, std::string const ) : 
m_id(id), m_code(code), m_text(text) {}
 template 
 Errata::Message::Message(Id id, Code code, Args const &... text) : m_id(id), 
m_code(code), m_text(stringify(text...))
 {
diff --git a/src/tscore/Makefile.am b/src/tscore/Makefile.am
index 76cd274..ed6788e 100644
--- a/src/tscore/Makefile.am
+++ b/src/tscore/Makefile.am
@@ -185,7 +185,8 @@ test_tscore_SOURCES = \
unit_tests/test_scoped_resource.cc \
unit_tests/test_Tokenizer.cc \
unit_tests/test_ts_file.cc \
-   unit_tests/test_Version.cc
+   unit_tests/test_Version.cc \
+   unit_tests/test_Errata.cc
 
 if HAS_HKDF
 test_tscore_SOURCES += \
diff --git a/src/tscore/unit_tests/test_Errata.cc 
b/src/tscore/unit_tests/test_Errata.cc
new file mode 100644
index 000..a234f77
--- /dev/null
+++ b/src/tscore/unit_tests/test_Errata.cc
@@ -0,0 +1,60 @@
+/**
+  @file Test for Errata
+
+  @section license License
+
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+#include "catch.hpp"
+
+#include "tscore/Errata.h"
+
+TEST_CASE("Basic Errata with text only", "[errata]")
+{
+  ts::Errata err;
+  std::string text{"Some error text"};
+  err.push(text);
+  REQUIRE(err.isOK()); // as code is 0 by default.
+  REQUIRE(err.top().text() == text);
+}
+
+TEST_CASE("Basic Errata test with id and text", "[errata]")
+{
+  ts::Errata err;
+  int id{1};
+  std::string text{"Some error text"};
+
+  err.push(id, text);
+
+  REQUIRE(err.isOK()); // as code is 0 by default.
+  REQUIRE(err.top().text() == text);
+}
+
+TEST_CASE("Basic Errata test with id,code and text", "[errata]")
+{
+  ts::Errata err;
+  int id{1};
+  int code{2};
+  std::string text{"Some error text"};
+
+  err.push(id, code, text);
+
+  REQUIRE(!err.isOK()); // This should not be ok as code now is 2
+  REQUIRE(err.top().getCode() == code);
+  REQUIRE(err.top().text() == text);
+}



[trafficserver] branch 9.0.x updated: Updated ChangeLog

2020-08-21 Thread zwoop
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


The following commit(s) were added to refs/heads/9.0.x by this push:
 new 350666d  Updated ChangeLog
350666d is described below

commit 350666deb8956d8bb5af7f19e95befd849bcffc7
Author: Leif Hedstrom 
AuthorDate: Fri Aug 21 08:07:35 2020 -0600

Updated ChangeLog
---
 CHANGELOG-9.0.0 | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/CHANGELOG-9.0.0 b/CHANGELOG-9.0.0
index 7d2cc15..802c56b 100644
--- a/CHANGELOG-9.0.0
+++ b/CHANGELOG-9.0.0
@@ -979,6 +979,7 @@ Changes with Apache Traffic Server 9.0.0
   #6873 - Metrics for origin close
   #6880 - Add new API / TSPluginDSOReloadEnable to override  DSO remap dynamic 
reload.
   #6884 - microserver error handling: SSLError check and debug.
+  #6888 - AuTest: port selection improvements.
   #6889 - Improve client_vc tracking
   #6891 - Make h2spec test more resiliant by extending timeout
   #6892 - Fix compiler issue with ICC 19.1
@@ -1009,6 +1010,7 @@ Changes with Apache Traffic Server 9.0.0
   #6969 - Update docs for some DNS config settings
   #6977 - Preserve cert name through ssl vc migration
   #6980 - Add maxmind acl plugin
+  #6981 - Update autest to version 1.8.0
   #6984 - Fix out of source tree builds for QUIC
   #6994 - Adds null check
   #7000 - Add QUIC draft-27 support
@@ -1024,6 +1026,7 @@ Changes with Apache Traffic Server 9.0.0
   #7035 - Add a null check to avoid crashing
   #7036 - Add virtual destructor to QUICTPConfig.
   #7040 - Remove deprecated verify.server for 9.0
+  #7046 - Fixes spelling H3-related code
   #7048 - Fixes spelling in docs
   #7050 - Fixed CLIENT-URL to use the pristine client URL
   #7056 - Fix proxy.process.http.current_client_connections
@@ -1032,6 +1035,7 @@ Changes with Apache Traffic Server 9.0.0
   #7060 - Document proxy.config.http.cache.post_method.
   #7061 - Don't make an error on receiving retransmitted handshake data
   #7062 - Signal WRITE_COMPLETE regardless of transmission progress
+  #7065 - Updating to AuTest 1.8.1.
   #7069 - Move the direct self loop check later to HttpSM::do_http_server_open
   #7074 - Add TS_USE_QUIC to traffic_layout info
   #7080 - Fix a crash on connection migration to the advertised preferred 
address
@@ -1043,3 +1047,10 @@ Changes with Apache Traffic Server 9.0.0
   #7087 - Fix eval_ip compile - missing const.
   #7089 - Converts files to #pragma once
   #7091 - Adds description for ssl_ticket_number in ssl_multicert docs
+  #7095 - Refresh proxy protocol diagram
+  #7098 - Remove more deadcode
+  #7104 - Don't send image/webp responses from cache to broswers that don't 
support it
+  #7110 - Add QUIC draft-29 support
+  #7113 - Updating our autest suite to require Python3.6
+  #7118 - Backing out my update of our jenkin's autest file.
+  #7122 - Make tls_hooks tests more likely to pass particularly for 9.0.x 
branch