summaryrefslogtreecommitdiff
path: root/test/http
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-03-20 23:38:04 +0300
committerEd Tanous <ed@tanous.net>2024-03-28 06:35:52 +0300
commitf0b59af46a6aa84890d2181b08d4e1af5ce5002f (patch)
tree446e1ed998ede11cbad0faa93a65c727eb6bb3df /test/http
parent5a8b641229ad1b1c14ae10b7772e5361503675c7 (diff)
downloadbmcweb-f0b59af46a6aa84890d2181b08d4e1af5ce5002f.tar.xz
Add misc-include-cleaner
And fix the includes that are wrong. Note, there is a very large ignore list included in the .clang-tidy configcfile. These are things that clang-tidy doesn't yet handle well, like knowing about a details include. Change-Id: Ie3744f2c8cba68a8700b406449d6c2018a736952 Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'test/http')
-rw-r--r--test/http/crow_getroutes_test.cpp5
-rw-r--r--test/http/http2_connection_test.cpp12
-rw-r--r--test/http/http_body_test.cpp4
-rw-r--r--test/http/http_connection_test.cpp9
-rw-r--r--test/http/http_response_test.cpp11
-rw-r--r--test/http/mutual_tls.cpp12
-rw-r--r--test/http/mutual_tls_meta.cpp4
-rw-r--r--test/http/server_sent_event_test.cpp8
-rw-r--r--test/http/utility_test.cpp10
9 files changed, 56 insertions, 19 deletions
diff --git a/test/http/crow_getroutes_test.cpp b/test/http/crow_getroutes_test.cpp
index e5c9d6eb7e..0c3f8de608 100644
--- a/test/http/crow_getroutes_test.cpp
+++ b/test/http/crow_getroutes_test.cpp
@@ -1,7 +1,6 @@
#include "app.hpp"
-#include "routing.hpp"
-
-#include <boost/beast/http/status.hpp>
+#include "async_resp.hpp"
+#include "http_request.hpp"
#include <memory>
diff --git a/test/http/http2_connection_test.cpp b/test/http/http2_connection_test.cpp
index 7d6572cb1c..dc71ef3d73 100644
--- a/test/http/http2_connection_test.cpp
+++ b/test/http/http2_connection_test.cpp
@@ -1,13 +1,21 @@
+#include "async_resp.hpp"
#include "http/http2_connection.hpp"
#include "http/http_request.hpp"
#include "http/http_response.hpp"
+#include <nghttp2/nghttp2.h>
+#include <unistd.h>
+
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/impl/write.hpp>
+#include <boost/asio/io_context.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/beast/_experimental/test/stream.hpp>
+#include <boost/beast/http/field.hpp>
#include <bit>
-#include <filesystem>
-#include <fstream>
+#include <cstddef>
+#include <cstdint>
#include <functional>
#include <memory>
#include <string>
diff --git a/test/http/http_body_test.cpp b/test/http/http_body_test.cpp
index 6367cf9409..0983c1d815 100644
--- a/test/http/http_body_test.cpp
+++ b/test/http/http_body_test.cpp
@@ -1,11 +1,15 @@
#include "file_test_utilities.hpp"
#include "http_body.hpp"
+#include <boost/beast/core/file_base.hpp>
#include <boost/system/error_code.hpp>
#include <array>
+#include <cstddef>
+#include <cstdio>
#include <span>
#include <string>
+#include <utility>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
diff --git a/test/http/http_connection_test.cpp b/test/http/http_connection_test.cpp
index 6647e61d99..4dda70ecf8 100644
--- a/test/http/http_connection_test.cpp
+++ b/test/http/http_connection_test.cpp
@@ -1,15 +1,20 @@
+#include "async_resp.hpp"
#include "http/http_connection.hpp"
#include "http/http_request.hpp"
#include "http/http_response.hpp"
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/io_context.hpp>
#include <boost/asio/steady_timer.hpp>
#include <boost/beast/_experimental/test/stream.hpp>
+#include <boost/beast/http/field.hpp>
+#include <boost/beast/http/verb.hpp>
-#include <filesystem>
-#include <fstream>
+#include <chrono>
#include <functional>
#include <memory>
#include <string>
+#include <utility>
#include "gtest/gtest.h"
namespace crow
diff --git a/test/http/http_response_test.cpp b/test/http/http_response_test.cpp
index 457cd7a924..d0836a2bab 100644
--- a/test/http/http_response_test.cpp
+++ b/test/http/http_response_test.cpp
@@ -1,13 +1,18 @@
#include "boost/beast/core/buffers_to_string.hpp"
-#include "boost/beast/core/flat_buffer.hpp"
#include "boost/beast/http/serializer.hpp"
#include "file_test_utilities.hpp"
#include "http/http_body.hpp"
#include "http/http_response.hpp"
+#include "utility.hpp"
+#include <boost/beast/core/file_base.hpp>
+#include <boost/beast/core/file_posix.hpp>
+#include <boost/beast/http/message.hpp>
+#include <boost/beast/http/status.hpp>
+
+#include <cstdio>
#include <filesystem>
-#include <fstream>
-#include <thread>
+#include <string>
#include "gtest/gtest.h"
namespace
diff --git a/test/http/mutual_tls.cpp b/test/http/mutual_tls.cpp
index 7b5cb25acd..be8b65102f 100644
--- a/test/http/mutual_tls.cpp
+++ b/test/http/mutual_tls.cpp
@@ -1,8 +1,20 @@
#include "mutual_tls.hpp"
+#include "sessions.hpp"
+
+#include <openssl/asn1.h>
+#include <openssl/ec.h>
+#include <openssl/evp.h>
+#include <openssl/obj_mac.h>
+#include <openssl/types.h>
+#include <openssl/x509.h>
+#include <openssl/x509_vfy.h>
+#include <openssl/x509v3.h>
+
#include <boost/asio/ip/address.hpp>
#include <boost/asio/ssl/verify_context.hpp>
+#include <array>
#include <memory>
#include <gmock/gmock.h>
diff --git a/test/http/mutual_tls_meta.cpp b/test/http/mutual_tls_meta.cpp
index 5f32cb54a1..0e280c10c9 100644
--- a/test/http/mutual_tls_meta.cpp
+++ b/test/http/mutual_tls_meta.cpp
@@ -1,5 +1,9 @@
#include "http/mutual_tls_meta.hpp"
+#include <optional>
+#include <string>
+#include <vector>
+
#include <gtest/gtest.h> // IWYU pragma: keep
namespace redfish
diff --git a/test/http/server_sent_event_test.cpp b/test/http/server_sent_event_test.cpp
index d3f9403364..3e740cb525 100644
--- a/test/http/server_sent_event_test.cpp
+++ b/test/http/server_sent_event_test.cpp
@@ -1,15 +1,15 @@
#include "boost/asio/read.hpp"
-#include "boost/asio/read_until.hpp"
-#include "http/http_request.hpp"
-#include "http/http_response.hpp"
#include "http/server_sent_event.hpp"
-#include <boost/asio/steady_timer.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/io_context.hpp>
#include <boost/beast/_experimental/test/stream.hpp>
+#include <chrono>
#include <memory>
#include <string>
#include <string_view>
+#include <utility>
#include "gtest/gtest.h"
namespace crow
diff --git a/test/http/utility_test.cpp b/test/http/utility_test.cpp
index c0b6412af2..20af871516 100644
--- a/test/http/utility_test.cpp
+++ b/test/http/utility_test.cpp
@@ -1,16 +1,16 @@
-#include "bmcweb_config.h"
#include "utility.hpp"
-#include <boost/url/error.hpp>
+#include <bits/basic_string.h>
+
+#include <boost/system/result.hpp>
+#include <boost/url/parse.hpp>
#include <boost/url/url.hpp>
#include <boost/url/url_view.hpp>
-#include <nlohmann/json.hpp>
-#include <cstdint>
+#include <algorithm>
#include <ctime>
#include <functional>
-#include <limits>
#include <string>
#include <string_view>