You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sz...@apache.org on 2023/05/23 03:51:32 UTC

[nifi-minifi-cpp] 04/04: MINIFICPP-2122 Upgrade CivetWeb to version 1.16

This is an automated email from the ASF dual-hosted git repository.

szaszm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git

commit c9624ffb6fa87bcb361405b1671494201b4a46dd
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Mon May 22 14:14:31 2023 +0200

    MINIFICPP-2122 Upgrade CivetWeb to version 1.16
    
    Closes #1575
    Signed-off-by: Marton Szasz <sz...@apache.org>
---
 cmake/CivetWeb.cmake                               |  4 ++--
 extensions/http-curl/tests/HTTPSiteToSiteTests.cpp | 26 ++++++----------------
 2 files changed, 9 insertions(+), 21 deletions(-)

diff --git a/cmake/CivetWeb.cmake b/cmake/CivetWeb.cmake
index effc81564..cbd1b2c31 100644
--- a/cmake/CivetWeb.cmake
+++ b/cmake/CivetWeb.cmake
@@ -26,8 +26,8 @@ set(CIVETWEB_ALLOW_WARNINGS "ON" CACHE STRING "" FORCE)
 set(CIVETWEB_ENABLE_ASAN "OFF" CACHE STRING "" FORCE)
 
 FetchContent_Declare(civetweb
-    GIT_REPOSITORY "https://github.com/civetweb/civetweb.git"
-    GIT_TAG "4447b6501d5c568b4c6c0940eac801ec690b2250" # commit containing fix for MSVC issue https://github.com/civetweb/civetweb/issues/1024
+    URL      https://github.com/civetweb/civetweb/archive/refs/tags/v1.16.tar.gz
+    URL_HASH SHA256=f0e471c1bf4e7804a6cfb41ea9d13e7d623b2bcc7bc1e2a4dd54951a24d60285
 )
 
 FetchContent_MakeAvailable(civetweb)
diff --git a/extensions/http-curl/tests/HTTPSiteToSiteTests.cpp b/extensions/http-curl/tests/HTTPSiteToSiteTests.cpp
index 78ca8ac5f..311c7b501 100644
--- a/extensions/http-curl/tests/HTTPSiteToSiteTests.cpp
+++ b/extensions/http-curl/tests/HTTPSiteToSiteTests.cpp
@@ -77,7 +77,7 @@ class SiteToSiteTestHarness : public HTTPIntegrationBase {
 struct test_profile {
   [[nodiscard]] bool allFalse() const {
     return !flow_url_broken && !transaction_url_broken &&
-      !empty_transaction_url && !no_delete && !invalid_checksum;
+      !empty_transaction_url && !invalid_checksum;
   }
   // tests for a broken flow file url
   bool flow_url_broken{false};
@@ -85,8 +85,6 @@ struct test_profile {
   bool transaction_url_broken{false};
   // Location will be absent within the
   bool empty_transaction_url{false};
-  // delete url is not supported.
-  bool no_delete{false};
   // invalid checksum error
   bool invalid_checksum{false};
 };
@@ -151,15 +149,13 @@ void run_variance(const std::string& test_file_location, bool isSecure, const st
   harness.setUrl(flow_url, flowResponder);
   harness.setUrl(flow_output_url, flowOutputResponder);
 
-  if (!profile.no_delete) {
-    std::string delete_url = transaction_url + "/" + transaction_id;
-    auto *deleteResponse = new DeleteTransactionResponder(delete_url, "201 OK", 12);
-    harness.setUrl(delete_url, deleteResponse);
+  std::string delete_url = transaction_url + "/" + transaction_id;
+  auto *deleteResponse = new DeleteTransactionResponder(delete_url, "201 OK", 12);
+  harness.setUrl(delete_url, deleteResponse);
 
-    std::string delete_output_url = transaction_output_url + "/" + transaction_output_id;
-    auto *deleteOutputResponse = new DeleteTransactionResponder(delete_output_url, "201 OK", producedFlows);
-    harness.setUrl(delete_output_url, deleteOutputResponse);
-  }
+  std::string delete_output_url = transaction_output_url + "/" + transaction_output_id;
+  auto *deleteOutputResponse = new DeleteTransactionResponder(delete_output_url, "201 OK", producedFlows);
+  harness.setUrl(delete_output_url, deleteOutputResponse);
 
   harness.run(test_file_location);
 
@@ -180,8 +176,6 @@ void run_variance(const std::string& test_file_location, bool isSecure, const st
     assertStr.str(std::string());
     assertStr << "Site2Site delete transaction " << transaction_id;
     assert(LogTestController::getInstance().contains(assertStr.str()));
-  } else if (profile.no_delete) {
-    assert(LogTestController::getInstance().contains("Received 401 response code from delete"));
   } else {
     assertStr << "Site2Site transaction " << transaction_id << " peer unknown respond code 254";
     assert(LogTestController::getInstance().contains(assertStr.str()));
@@ -218,12 +212,6 @@ int main(int argc, char **argv) {
     run_variance(args.test_file, isSecure, args.url, profile);
   }
 
-  {
-    struct test_profile profile;
-    profile.no_delete = true;
-    run_variance(args.test_file, isSecure, args.url, profile);
-  }
-
   {
     struct test_profile profile;
     profile.invalid_checksum = true;